+ Reply to Thread
Results 1 to 5 of 5

Trigger macro on click

  1. #1
    Registered User
    Join Date
    06-30-2013
    Location
    Athens Greece
    MS-Off Ver
    Excel 2007
    Posts
    9

    Trigger macro on click

    Hello forum,

    I have made a macro to activate a pop-up calendar.
    Right now the macro is activated either by right clicking and choosing insert date OR by holding down the [CONTROL] and [SHIFT] keys and pressing [C]
    I want the macro to be activated every time I click on specific cells, that is column B and column H.
    Is that possible?

    I attach the file, the macro is called OpenCalendar
    OB Wheel.xlsm

    Many thanks in advance
    Ioanna
    Last edited by ikavellari; 07-05-2013 at 08:13 AM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Trigger macro on click

    One way:

    Please Login or Register  to view this content.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Contributor
    Join Date
    11-25-2010
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    120

    Re: Trigger macro on click

    Hi,

    You have to add the code to the sheet you want this to occur on in your workbook that is sheet1 and then use the SelectionChange event handler:

    Please Login or Register  to view this content.
    This will open the calendar if you click in Column B or H.

    Don't forget to mark as Solved and Add Reputation.
    If the post was helpful please click the black star on the bottom left to add some reputation and mark your thread as SOLVED.

    A day with nothing new achieved or learned, albeit however small, is a day lost forever?

    Constant Never Ending Improvement

  4. #4
    Forum Contributor
    Join Date
    11-25-2010
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    120

    Re: Trigger macro on click

    Quote Originally Posted by Palmetto View Post
    One way:

    Please Login or Register  to view this content.
    Yes that line would be good housekeeping

  5. #5
    Registered User
    Join Date
    06-30-2013
    Location
    Athens Greece
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Trigger macro on click

    THANKS a lot it worked fine!!

+ 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