activate code on single click
Yes. By using a hyperlink and a hyperlink event macro.
First select A1 and:
Insert Hyperlink... to a place in this document
then pick cell A1 and give it the name "no"
This looks pretty useless. We have created a hyperlink that goes nowhere!
However, then insert the following event macro in the worksheet code area:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
For Each h In ActiveSheet.Hyperlinks
If h.SubAddress = "Sheet1!A1" Then
h.TextToDisplay = "yes"
End If
Next
End Sub
Now if we click on A1, the macro fires and changes the visible text to "yes"
Without the hyperlink, we would have to rely on a double-click event.
--
Gary''s Student - gsnu200852
"sunilpatel" wrote:
Is there a way to activate code on a "Single" click in the activecell /
selected cell on sheet.
i have "no" in cell "a1" and it is selected. i want it to change to "yes" if
i single clik on "a1"
Probably not possible hey?
Sunil
|