+ Reply to Thread
Results 1 to 3 of 3

Worksheet_Activate Doesn't Work On Chart Sheet

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    USA
    MS-Off Ver
    2019 16.0.13205.200000 64-bit
    Posts
    61

    Question Worksheet_Activate Doesn't Work On Chart Sheet

    Guys, I have a chart sheet (a whole sheet that is a chart) where I need to use Worksheet_Activate, meaning to run a macro when users switches to that sheet. I tried using "Private Sub Worksheet_Activate()" as for any normal sheet, but it doesn't work: nothing happens and there's no EM. Does anyone know how can I get the same result/effect as for Worksheet_Activate on a chart sheet?
    The issue is similar to the one here.


    Thanks so much in advance!
    Office 2019 16.0.13205.200000 64-bit

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    Re: Worksheet_Activate Doesn't Work On Chart Sheet

    A chart is not a worksheet, hence there is no worksheet_activate event for it. the event is Chart_Activate

    If you select Chart from the left dropdown at the top of the main code window, the right dropdown will show you the available events and selecting one will produce the correct declaration for you.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    USA
    MS-Off Ver
    2019 16.0.13205.200000 64-bit
    Posts
    61

    Re: Worksheet_Activate Doesn't Work On Chart Sheet

    Quote Originally Posted by romperstomper View Post
    A chart is not a worksheet, hence there is no worksheet_activate event for it. the event is Chart_Activate

    If you select Chart from the left dropdown at the top of the main code window, the right dropdown will show you the available events and selecting one will produce the correct declaration for you.
    Works as charm, thanks so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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