Calendar Form Update
I'm not sure what you're doing and what code goes in what userform module...
But I'd try this in Userform1.
Option Explicit
Private Sub Calendar1_Click()
with ActiveCell
.numberformat = "mmmm dd, yyyy" 'unambiguous format for testing!
.value = me.Calendar1.Value
end with
End Sub
Private Sub UserForm_Activate()
Me.Calendar1.Value = format(Date, "mmmm dd, yyyy") 'unambiguous format!
End Sub
But I don't understand what you're doing with the other stuff to guess.
NFL wrote:
The calendar is named USERFORM1 and here is the code for it.
Option Explicit
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
ActiveCell.NumberFormat = "mm/dd/yy"
End Sub
Private Sub UserForm_Activate()
Me.Calendar1.Value = Date
End Sub
I have another form called NOTES and what I like to do is when I select a
textbox I would like enter a date by using the calendar. Here is the code I
have in my textbox.
I removed the 2nd entry because I would always get a 12/12/2003 date in the
textbox. The calendar works great, but I can't select a date. Thank you for
your help!
Private Sub TextBox60_Change()
UserForm1.Show
'Me.TextBox60 = [UserForm1].Calendar1.Value
End Sub
--
Dave Peterson
|