Calendar Control

yash

New Member
Joined
Oct 29, 2004
Messages
18
Hi guys,

I need a free calendar control to use in a userform in excel VBA. Please let me know instructions on how to use this also, if possible.

Thanks,
Yash :eek:
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
There is already one built in.
In the VBE goto Tools, Reference, Browse, All File Types and make a reference to C:\Program Files\Microsoft Office\Office10\mscal.ocx
This will create an entry that says something to the effect of microsoft calander control. Place a check mark in teh box next to it and press ok.
Then goto tools, additional controls and add Calander Control 10.0. This will add a item to your controlbox that looks like a grid. It will be your calander. Here is some sample code on how you might interact with it.

Code:
Private Sub Calendar1_Click()
Selection = Calendar1.Value
Unload Me
End Sub

Private Sub CommandButton1_Click()

Calendar1.Value = Date
Selection = Calendar1.Value
Unload Me
End Sub

Private Sub CommandButton2_Click()
Unload Me
End Sub

Private Sub UserForm_Initialize()
If IsDate(ActiveCell.Value) Then
      Calendar1.Value = DateValue(ActiveCell.Value)
Else
      Calendar1.Value = Date
End If
End Sub
 
Upvote 0
Did you try using the below instructions with office 11? (Cuase they should work)
 
Upvote 0
RAM,

You should be able to see it as a control using Insert Object from the code window. If Calendar control is not there, you may not have MS Access installed on your machine. As I understand things, it is the mscal.ocx is installed as part of the Access libraries...
 
Upvote 0
Insert - Object. There is no Calendar control under the Create New tab. No, I don't have Access.

RAM
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,057
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top