Hi All, New here and a bit of a novice.
I want to be able to click on a cell eg. C9 and run 1 macro, Click on C10 and run another macro etc.
I would prefer not to have button.
What is the best way?![]()
Hi All, New here and a bit of a novice.
I want to be able to click on a cell eg. C9 and run 1 macro, Click on C10 and run another macro etc.
I would prefer not to have button.
What is the best way?![]()
Hi
You can with this:
Alt+F11 and paste the following
Close the window. Double click and the macro will be executed.It's an example.![]()
Please Login or Register to view this content.
Last edited by Raiby; 01-18-2009 at 05:38 AM.
This can be done with a Worksheet Event
Place this code into the Worksheet Module by right clicking on the sheet tab and selecting View Code, Paste the code there....
![]()
Please Login or Register to view this content.
Ralby
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
luffield,
You can use the Worksheet_SelectionChange Event to accomplish your request.
Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).
Right click the sheet tab you want the code in, and click on View Code. Paste the below code there (on the right pane).
![]()
Please Login or Register to view this content.
Press and hold down the 'ALT' key, and press the 'F11' key.
On the 'Insert' menu, click 'Module'.
Copy the below code, and paste it into the Module (on the right pane).
![]()
Please Login or Register to view this content.
Then click on either cell C9 or C10.
Have a great day,
Stan
Last edited by stanleydgromjr; 01-17-2009 at 09:58 AM.
Have a great day,
Stan
Windows 10, Excel 2007, on a PC.
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
Thanks very much for your help
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks