PDA

View Full Version : Solved: Calendar Control



zoom38
06-03-2009, 05:28 PM
Is there a way to add an arrow to the left (to move one month before) and to the right (to move one month later) on the pop up calendar? I don't have much experience with user forms. I'm using Exce; 2003 with calendar control 11.0.

Thank
Gary

Kenneth Hobs
06-03-2009, 06:30 PM
You can add a commandbutton to do it. Use a caption of say <- and locate near the Month droplist. Or, add picture of a left arrow to the Picture property of the commandbutton. Then you just need to use DateAdd(). e.g.
Private Sub CommandButton1_Click()
Calendar1.Value = DateAdd("m", -1, Calendar1.Value)
End Sub

Another method would be to use a SpinButton control.

p45cal
06-04-2009, 02:23 AM
Might the Microsoft Date and Time Picker control serve you better (right click in the Toolbox and choose additional controls..)? It has those arrows and a multitude of other ways to select a date (if that's what your aim is).

zoom38
06-04-2009, 06:31 AM
I tried the DatePicker control and its not really what I wanted. Ken thanks for the tip but I found exactly what I wanted at the following link.
http://www.mediafire.com/?29hymh2m3ew

Thanks Again
Gary