PLEASE HELP!!!!!!!!!!!!

A

AL

Hello everyone...

I have the following code on my worksheet to popup the calendar. The
calendar worked fine when I was initially putting the code on the
worksheet, BUT when I saved and closed my worksheet and re-opened it...
the Calendar popped up right on top on the worksheet and I can't change
any dates by clicking on it.... (It just stays there - frozen). I only
want the Calendar to pop up when someone clicks on the cell C17.... NOT
EVERYTIME I OPEN THE WORKSHEET. Can someone please HELP ME fix this
problem. I will really appreciate it.

Private Sub Calendar1_Click()
ActiveCell.NumberFormat = "m/d/yyyy"
Calendar1.Visible = False
ActiveCell = Calendar1.Value
Calendar1.Visible = False
End Sub


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("c17:c17"), Target) Is Nothing Then
'(adjust for your range)
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Value = Now()
Calendar1.Visible = True
Else: Calendar1.Visible = False
End If
End Sub
 
S

sandydavies

Try putting this in your ThisWorkbook, change "Sheet1" to what ever the
name of your sheet is. This will hide the calendar when ever the
worksheet is opened.

Sandy

Private Sub Workbook_Open()
Worksheets("Sheet1").Calendar1.Visible = False
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top