Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
NFL NFL is offline
external usenet poster
 
Posts: 31
Default Calendar Form Update

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
NFL NFL is offline
external usenet poster
 
Posts: 31
Default Calendar Form Update

I'm working with 2 forms.

Userform1 is 1st form where the calendar is already made and the other form
is called NOTES:

With NOTES opened, I would like to enter a date in the textbox by using a
calendar from Userform1.

Hope that makes sense...

"Dave Peterson" wrote:

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
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Calendar Form Update

Both of these userforms are open.
Userform1 contains the calendar control.
Notes contains the Textbox.

This is in the Userform1 module:

Option Explicit
Private Sub Calendar1_Click()
Notes.TextBox1.Value = Format(Me.Calendar1.Value, "mmmm dd, yyyy")
End Sub






NFL wrote:

I'm working with 2 forms.

Userform1 is 1st form where the calendar is already made and the other form
is called NOTES:

With NOTES opened, I would like to enter a date in the textbox by using a
calendar from Userform1.

Hope that makes sense...

"Dave Peterson" wrote:

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
.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
NFL NFL is offline
external usenet poster
 
Posts: 31
Default Calendar Form Update

Thank you!

"Dave Peterson" wrote:

Both of these userforms are open.
Userform1 contains the calendar control.
Notes contains the Textbox.

This is in the Userform1 module:

Option Explicit
Private Sub Calendar1_Click()
Notes.TextBox1.Value = Format(Me.Calendar1.Value, "mmmm dd, yyyy")
End Sub






NFL wrote:

I'm working with 2 forms.

Userform1 is 1st form where the calendar is already made and the other form
is called NOTES:

With NOTES opened, I would like to enter a date in the textbox by using a
calendar from Userform1.

Hope that makes sense...

"Dave Peterson" wrote:

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
.


--

Dave Peterson
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call up form calendar form VBA Bob Phillips Excel Programming 3 January 21st 07 10:50 PM
newbie/ update a calendar oneway Excel Discussion (Misc queries) 0 August 20th 06 04:54 PM
Update Calendar Control macroplay Excel Programming 1 July 30th 06 06:01 PM
Copy form field value to another form (calendar) [email protected] Excel Programming 1 December 1st 05 09:58 PM
How do I update calendar control 8.0 to 10.0 Ron de Bruin Excel Programming 7 February 2nd 04 03:14 PM


All times are GMT +1. The time now is 11:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"