TheToeOfPooh
Active Member
- Joined
- May 21, 2004
- Messages
- 254
I have searched and can not find an answer as to how today's date is defined using VBA.
e.g.
strToYearDate As String * 4 'I can set as 2004
strToMonthDate As String * 2 'I can set as 09 for Sept
strToDayDate As String * 2 'How do I set this to automatically change?
e.g. strToDayDate will be 13 (As it is the 13th of Sept), but tomorrow I need it to automatically increase to 14,etc.
I will change the Year and Month dates manually unless there is a simple routine for this too?
I am using this code "behind" a command button on a form named
Current job Reports.
When the user selects this button they start a process which produces a job duplication and variation report. All that works but I can't get this first part sorted.
(Currently I am typing in all the dates using InputBoxes).
Anyone able to advise me what I need to do please?
Bernard
e.g.
strToYearDate As String * 4 'I can set as 2004
strToMonthDate As String * 2 'I can set as 09 for Sept
strToDayDate As String * 2 'How do I set this to automatically change?
e.g. strToDayDate will be 13 (As it is the 13th of Sept), but tomorrow I need it to automatically increase to 14,etc.
I will change the Year and Month dates manually unless there is a simple routine for this too?
I am using this code "behind" a command button on a form named
Current job Reports.
When the user selects this button they start a process which produces a job duplication and variation report. All that works but I can't get this first part sorted.
(Currently I am typing in all the dates using InputBoxes).
Anyone able to advise me what I need to do please?
Bernard