If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Event when i change active sheet

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-26-09, 13:11
vramalho vramalho is offline
Registered User
 
Join Date: Mar 2009
Posts: 1
Event when i change active sheet

Dear all,

I need some help for a vba code.

I need to had some code when user selects a specific sheet. I have a workbook with 5 sheets, and i need to send a message when user is on sheet 1 and changes ( by bottom toolbar ) to sheet 2.

My problem is that i don't know which event is trigered when user do this kind of thing.

Could you help me?


Thanks,

Vitor
Reply With Quote
  #2 (permalink)  
Old 03-26-09, 18:33
VBAExpert VBAExpert is offline
Registered User
 
Join Date: Mar 2009
Location: Worthing, UK
Posts: 16
Worksheet_Activate Events for the worksheet object occurs when a worksheet is activated or the user changes the content of a cell.


Right click on Sheet2 tab (by bottom toolbar ) and select "View Code" and then copy the following code

Code:
Private Sub Worksheet_Activate()

'Code by Muhammad Anisur Rahman
'Date 26/03/2009

             'Your code here
	MsgBox "You Message here"

End Sub
Quote:
Originally Posted by vramalho
Dear all,

I need some help for a vba code.

I need to had some code when user selects a specific sheet. I have a workbook with 5 sheets, and i need to send a message when user is on sheet 1 and changes ( by bottom toolbar ) to sheet 2.

My problem is that i don't know which event is trigered when user do this kind of thing.

Could you help me?


Thanks,

Vitor
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On