Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello!
I'm having trouble with Deactivate Sheet. My workbook has two sheets, Sheet1 and Sheet2. In Sheet1, I have this macro: Private Sub Worksheet_Deactivate() Worksheets("Sheet1").Activate Range("A1:A10").Select Selection.Sort Key1:=Range("A1"), Order1:=xlAscending End Sub However, when I click on Sheet2, Sheet1 won't "let go." I suppose it's because of the third line [Range("A1:A10").Select]. but, without that line, I get an error message. How do I get the macro to "let go" of sheet 1 and go to sheet 2 when I click on Sheet2? Also, I tested another similar Worksheet_Deactivate macro (not using a sort routine) which worked okay, but it left a selection "shadow" on Sheet2. Your help is appreciated. Thanks, Jay |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deactivate worksheet | Excel Discussion (Misc queries) | |||
Deactivate a cell | Excel Programming | |||
deactivate fullscreen | Excel Programming | |||
Sort sheet on sheet's Deactivate event | Excel Programming | |||
Deactivate Formula | Excel Programming |