Mouse Click to Run Macro

J

JAD

I have a table that contains (50) selections. In the past, I would have the
user type in a lower case "x" in the cell next to the selection to activate a
macro to un hide a section of the form. This time, I would like the user to
make a left mouse click the cell next to the selection they want to both
activate a macro to unhide the section and enter a lower case "x" in the box
they just left clicked on. The macro is already created and just needs to be
connected to the mouse click. Any help would be appreciated. Thank You, JAD
 
D

Don Guillett

right click sheet tab>view code>left window worksheet>right window RIGHT
click or DOUBLE click
 
G

Gary''s Student

Pick a cell and:

Insert > Hyperlink > to a place in this document > same cell

So clicking on this hyperlink just takes back to itself (you don't really
jump at all)

In the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
ActiveCell.Value = "x"
Call AlreadyExists
End Sub

where AlreadyExists is the current macro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top