+ Reply to Thread
Results 1 to 5 of 5

Vba to activate when click on sheet

  1. #1
    Forum Contributor
    Join Date
    01-21-2017
    Location
    England
    MS-Off Ver
    2007
    Posts
    409

    Vba to activate when click on sheet

    Hi I have a click vba button but is it possible for it to activate just when I click a specific sheet rather than needing click button itself .
    Thanks in advance

  2. #2
    Forum Contributor
    Join Date
    01-05-2017
    Location
    New York
    MS-Off Ver
    Office 2016
    Posts
    206

    Re: Vba to activate when click on sheet

    Put this in the code sheet of the worksheet you want (NOT in a regular module)


    Please Login or Register  to view this content.
    Last edited by Raphaelp; 04-24-2017 at 05:14 PM.

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Vba to activate when click on sheet

    Yes, with Worksheet_Activate event.
    Place the code in the worksheet you want the code to run on when activated and change the title of the sub to
    Private Sub Worksheet_Activate()
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Forum Contributor
    Join Date
    01-21-2017
    Location
    England
    MS-Off Ver
    2007
    Posts
    409

    Re: Vba to activate when click on sheet

    thank you both so much

  5. #5
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Vba to activate when click on sheet

    You're welcome. Glad it worked for you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. shortcut key double click not activate
    By jpbisani in forum Excel General
    Replies: 0
    Last Post: 11-24-2015, 07:27 AM
  2. VBA: Click Button to Activate ComboBox
    By kersin01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-04-2014, 05:32 AM
  3. double click to activate iten in a userform
    By Nitzan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-19-2014, 09:19 AM
  4. Click on a cell and have that worksheet with the same name activate
    By grimston in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-30-2012, 03:17 PM
  5. Double Click to Activate Message Box
    By longbow007 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2009, 01:29 AM
  6. [SOLVED] How do I activate the right mouse click in Excel?
    By Kcm in forum Excel General
    Replies: 0
    Last Post: 03-28-2006, 03:20 AM
  7. [SOLVED] Click cell to activate macro
    By Bob in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-27-2006, 12:25 PM

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