+ Reply to Thread
Results 1 to 4 of 4

Display a message when worksheet is active

Hybrid View

  1. #1
    Registered User
    Join Date
    01-29-2007
    Posts
    47

    Cool Display a message when worksheet is active

    Hello all,

    What code can I use in order to display a msgbox when a worksheet is active??

    Thank you all

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    This goes in the ThisWorkBook module:
    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    MsgBox "This Sheet " & Chr(34) & ActiveSheet.Name & Chr(34) & " Is Now Active", vbOKOnly, "Sheet Activation"
    End Sub
    every time you change sheet you get a message pop up to tell you which sheet has been activated!

    Regards,
    Simon

  3. #3
    Registered User
    Join Date
    01-29-2007
    Posts
    47

    Smile

    Quote Originally Posted by Simon Lloyd
    This goes in the ThisWorkBook module:
    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    MsgBox "This Sheet " & Chr(34) & ActiveSheet.Name & Chr(34) & " Is Now Active", vbOKOnly, "Sheet Activation"
    End Sub
    every time you change sheet you get a message pop up to tell you which sheet has been activated!

    Regards,
    Simon


    Thank you Simon ( :

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Glad to help!

    Regards
    Simon

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1