View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Macro: automatically initiating upon cell click

This uses column E:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Columns("E")) Is Nothing Then
Exit Sub
End If
Application.EnableEvents = False
MsgBox ("Hello")
Application.EnableEvents = True
End Sub

Paste the sub into worksheet code. When you click on any cell in column E
the macro will fire. Adapt as you like.

REMEMBER: Worksheet code.
--
Gary's Student


"pmp613" wrote:

Hi - a newbie question:
I have a calendar macro which I want to kick off when a cell in the date
column on my worksheet is selected.

How do I do this, so the user of the sheet won't need to do anything more
than click on the cell, and then select the date from the popup?

Many, many thanks!
Ted