-
set calendar to open at a specified date.
Hi guys, have the below code which works great, but is there a way to set the date to 01/01/ & current year, each time it pops up? Right now it opens to todays date only.
[VBA]Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
ActiveCell.NumberFormat = "mm/dd/yy/h:mm am/pm"
Unload UserForm1
End Sub
Private Sub UserForm_Activate()
Me.Calendar1.Value = Date
End Sub
[/VBA]
-
[VBA]Private Sub UserForm_Activate()
Me.Calendar1.Value = DateSerial(Year(Date), 1, 1)
End Sub[/VBA]
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules