View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Henrich Henrich is offline
external usenet poster
 
Posts: 53
Default How to run a procedure on entering a specific cell?

Hi, try this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
cell_position = "$B$5"
check = ActiveCell.CurrentRegion.Address
If cell_position = check Then MsgBox "Your action"
' runs when a the cell is entered
End Sub


" napĂ*sal (napĂ*sala):

How to run a procedure on entering a specific cell?

I am trying to pop up a calendar control to enter a date into a
specific cell. For example: when the user moves the cursor to "B5", the
calendar control should become visible. The user then clicks on a date,
which is updated in cell "B5"

My problem is I do not know how to detect when the user selects a
specific cell in order to run the procedure. Is there a way?