View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default Repost: Calendar Control: Ron De Bruin

Michael,

Try replacing:
If Target.Column = 4 Then
with:
If Target.Address = Range("D4").Address Then

John

Michael wrote:

Hi Ron, the code below you posted earlier works great for
a whole column. How do I isolate it to one cell only,
say "d4", as I want the user only use the calender on one
cell.

Thanks,

Michael

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Target.Column = 4 Then
Calendar1.Left = Target.Left + Target.Width -
Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else: Calendar1.Visible = False
End If
End Sub