Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    1

    Unanswered: 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

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •