Thread: Clickable Cells
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Clickable Cells

You can do that. A better way however IMO is to use double click. Otherwise
any time you move to that cell by enter or arrow keys the macro will run.

Right click on the sheet tab and select view code. Paste the following in
the code window...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Address = "$A$1" Then
Cancel = True
MsgBox "Tada"
End If
End Sub

When you double click cell A1 a message box appears.
--
HTH...

Jim Thomlinson


"JSnow" wrote:

Is there any way to assign a macro to a cell instead of a button w/in a cell?
Ideally, I'd like certain cells to be "clickable" and if I can do this w/out
a button - great; if not - so be it.

Thanks in advance.