A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calander



 
 
Thread Tools Display Modes
  #1  
Old September 15th, 2003, 06:02 PM
John Mansship
external usenet poster
 
Posts: n/a
Default Calander

Let me rephrase my Calander question.
Does anyone know how to copy the date clicked on the
calender to a cell?
Example: In Excel VB, I inserted a calander (MonthView)
into a form. (Its not a typical object, I right-clicked on
the Object toolbox, and chose "Additional Controls", from
which I chose "Microsoft MonthView Control 6.0 (SP4)".
This allowed me to insert a changeable calender into a
form, callable from a worksheet. Question is: After
clicking a desired date, how do I copy that date to my
worksheet???
Anyone?
  #2  
Old September 15th, 2003, 06:08 PM
Michael J. Malinsky
external usenet poster
 
Posts: n/a
Default Calander

I'm assuming you placed a calendar control on a worksheet rather than having
one on a UserForm. That being said, do the following.

In design mode, right-click on the calendar control and select View Code.
The Visual Basic Editor will pop up. You will see two lines as follows:

Private Sub Calendar1_Click()

End Sub

If, for example, you want the selected date to appear in cell A1, then you
would insert the following between those two lines:

Range("A1").Value = Calendar1.Value

This is assuming your calendar is named Calendar1. You can check this by
right-clicking on the calendar control and selecting Properties. The name
of the control will be at the top of the Properties box that pops up.

HTH
Mike.


--
Michael J. Malinsky


"John Mansship" wrote in message
...
Let me rephrase my Calander question.
Does anyone know how to copy the date clicked on the
calender to a cell?
Example: In Excel VB, I inserted a calander (MonthView)
into a form. (Its not a typical object, I right-clicked on
the Object toolbox, and chose "Additional Controls", from
which I chose "Microsoft MonthView Control 6.0 (SP4)".
This allowed me to insert a changeable calender into a
form, callable from a worksheet. Question is: After
clicking a desired date, how do I copy that date to my
worksheet???
Anyone?



  #3  
Old September 15th, 2003, 06:30 PM
John Manship
external usenet poster
 
Posts: n/a
Default Calander

many thanks, Michael.
Actually, I am putting it into a userform so that I can
call it when I wish. But your answer is applicable for
both cases. Thanks again!!

-----Original Message-----
I'm assuming you placed a calendar control on a worksheet

rather than having
one on a UserForm. That being said, do the following.

In design mode, right-click on the calendar control and

select View Code.
The Visual Basic Editor will pop up. You will see two

lines as follows:

Private Sub Calendar1_Click()

End Sub

If, for example, you want the selected date to appear in

cell A1, then you
would insert the following between those two lines:

Range("A1").Value = Calendar1.Value

This is assuming your calendar is named Calendar1. You

can check this by
right-clicking on the calendar control and selecting

Properties. The name
of the control will be at the top of the Properties box

that pops up.

HTH
Mike.


--
Michael J. Malinsky


"John Mansship" wrote in message
...
Let me rephrase my Calander question.
Does anyone know how to copy the date clicked on the
calender to a cell?
Example: In Excel VB, I inserted a calander (MonthView)
into a form. (Its not a typical object, I right-clicked

on
the Object toolbox, and chose "Additional Controls",

from
which I chose "Microsoft MonthView Control 6.0 (SP4)".
This allowed me to insert a changeable calender into a
form, callable from a worksheet. Question is: After
clicking a desired date, how do I copy that date to my
worksheet???
Anyone?



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:20 PM.


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