Start a sheet event when i leave a sheet

H

hans

Is it posible to make changes on a sheet and then when i leave the sheet
start some macros for the sheet i just left?

Gretings Hans
 
S

steveB

Hans,

Put your code in the worksheet code:

Private Sub Worksheet_Deactivate()
*** your code ***
End Sub

To get to the code sheet - right click on the sheet tab and select "View
Code". This will take you to the code window. Above the 'blank' page are 2
edit boxes. From the one on the left - select "Worksheet", and from the one
on the right - select "Deactivate". Any code you put in here will run when
you select another worksheet tab.

hth
 
Top