Initializing Calendar Control to show current month?

G

Guest

I wrote a very simple Excel sheet to automate printing out weekly
timesheets with default data for each worker (Name, employee number,
contract or task orders, etc.). It includes a Calendar Control so the
supervisor can simply click on the work week end date (always a
Friday) and print out timesheets (for everyone or a selected few) in
the workgroup with customized data for each worker with a few clicks.

No data is entered by the Supervisor --- it is simply pick date (click
on Calendar), pick workers (select sheet tabs with their names), and
print time sheets (click on text box to executes a print macro).

Works fine. Saves time & prevents errors....

.... but the Calendar Control always defaults to the month the
spreadsheet was last saved by me. How may I initialize it so the
Calendar always 'slews' to the current month when the Supervisor runs
the sheet?

Thank you. Great group - I learn so much by reading the posts.....

/Cal/
 
B

BrianB

Change the form_initialize code like this :

Code
-------------------

With frmCalendar
.Caption = conCompanyName
.optBar = True
.optSortSales = True
.cmdChart.Enabled = False
'----------------------------------------------------------
'- changed the following line
.Calendar1.Value = "1/" & Month(Date) & "/" & Year(Date)
'---------------------------------------------------------------------
.Calendar1.SetFocus
End With
 
G

Guest

Not sure where that goes but will figger it out and try. If it's
anything like programming Outlook forms, I can manage it. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top