Initiate a form on the selection of a particular cell of a workshe
Option Explicit
Private Sub Worksheet_SeelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "D3"
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
frmCalendar.Show
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Stephane P" wrote in message
...
Hi,
I have made a form with a calendar and want to show the form when cell
"D3" is selected on a particular worksheet. Is there a straight forward
way
to do this?
--
Thanks
Stephane
|