Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Cell1 As String, Cell2 As String
Cell1 = "$F$20"
Cell2 = "$F$25"
If Target.Address = Cell1 Or Target.Address = Cell2 Then
Load UserForm2
UserForm2.Show
ActiveCell.Value = Calendar1.Value ' <<-- Error
UserForm2.Hide
Unload UserForm2
End If
End Sub
nanefy said:Hi,
I have used the calander function below and it works perfectly. The only problem is that it doesnt, by default, bring up the current month. I implemented this in September and now in October it doesnt bring October up as the default date. Can anyone tell me how to do this?
Cheers!
D4VE said:Try to add this code:
Private Sub UserForm_Activate()
Today = Now
Calendar1.Value = DateValue(Today)
End Sub