Start a sheet event when i leave a sheet

  • Thread starter Thread starter hans
  • Start date Start date
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
 
right click on the sheet tab>view code>select worksheet>select deactivate
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top