ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   call up a calendar (https://www.excelbanter.com/excel-programming/328479-call-up-calendar.html)

icebreaker914

call up a calendar
 
I WOULD LIKE TO PROGRAM A COMMAND BUTTON TO PULL UP A CALENDAR CONTROL. ONCE
DATE IS SELECTED, HAVE CALENDAR HIDDEN. CAN ANYONE HELP? THANKS IN ADVANCE
FOR THE HELP!
--
icebreaker914

Ron Coderre[_5_]

call up a calendar
 
I did something like what you want using my Personal.xls. Here's something
for you to work with:

1)Add a code reference to a Microsoft Calendar Control
2)Add a Form to your project and insert the Calendar Control to it. (I named
mine Calendar1)
3)Here's the form's code:
Option Explicit
Private Sub Calendar1_Click()
Unload Me
End Sub

4)Here's the code I put in a Workbook module:
Option Explicit
Sub ShowCalendar()
Dim newDate
Load frmCal
newDate = Format(Now(), "mm/dd/yyyy")
frmCal.Calendar1.Value = newDate
frmCal.Show
End Sub

5)Then, I just created a keyboard shortcut for the ShowCalendar macro:
ToolsMacroMacros
Select ShowCalendar
Click Options and select the shortcut keys: [Ctrl]+[Shift]+C

Anyway, that's what I did. You'd just have to engage the macro to a button,
instead.

Does that help?

--
Regards,
Ron


Paul B

call up a calendar
 
Icebreaker, have a look at Ron's site and see if this will work for you

http://www.rondebruin.nl/calendar.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"icebreaker914" wrote in message
...
I WOULD LIKE TO PROGRAM A COMMAND BUTTON TO PULL UP A CALENDAR CONTROL.

ONCE
DATE IS SELECTED, HAVE CALENDAR HIDDEN. CAN ANYONE HELP? THANKS IN

ADVANCE
FOR THE HELP!
--
icebreaker914




William[_2_]

call up a calendar
 

Place this code in a general module and assign it to your command button

Sub ShowCalendar()
Sheets("Sheet1").DrawingObjects("Calendar1").Visib le = True
End Sub

Place this code in the relevant worksheet module

Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
Calendar1.Visible = False
End Sub

--

XL2003
Regards

William



"icebreaker914" wrote in message
...
I WOULD LIKE TO PROGRAM A COMMAND BUTTON TO PULL UP A CALENDAR CONTROL.
ONCE
DATE IS SELECTED, HAVE CALENDAR HIDDEN. CAN ANYONE HELP? THANKS IN
ADVANCE
FOR THE HELP!
--
icebreaker914





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com