|
Denise,
You may have already receive your answer,, but I'll put my 2 cents worth in.
I often use these two user defined functions to define previous month date info:
'Beginning of Previous month
Public Function Bopm() As Date
Dim dtBopm As Date Dim dtEopm As Date dtEopm = Date - Day(Date) dtBopm = (dtEopm + 1) - Day(dtEopm) Bopm = dtBopm End Function 'End of Previous month
Public Function Eopm() As Date
Dim dtEopm As Date dtEopm = Date - Day(Date) Eopm = dtEopm End Function Use it for the previous month date range or Format either to obtain your date stamp in the file name.
Thanks,
Dwight Clevenger Senior System Analyst Baptist Health System 615 Soledad San Antonio, TX. 78213 210-297-1563 [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 03/24/2005 02:11 PM >>> This is probably very basic....
I am downloading a report at the beginning of every month for last month's data. I want to name the file to be last month's name, so that if I were downloading a report on March 1st, 2005, the file name would be 022005.txt.
The following code:
SendKeys "C:\Meditech Archives\" & Format(Now(), "mmyyyy") & ".txt"
recognizes that today is March whatever and gives me 032005.txt. How can I tell it to use LAST month's designation?
Bonus question - how would I tell it to use the name (February) of the month vs. the month number?
Many thanks in advance!
Denise
Denise Morrill
Senior Systems Analyst
Spring Harbor Hospital
123 Andover Rd
Westbrook, ME 04092
207.761.2265
[EMAIL PROTECTED]
CONFIDENTIAL NOTICE: This email message, including any attachments, is intended only for the use of the intended recipient(s) and may contain information that is privileged, confidential and prohibited from unauthorized disclosure under applicable law. If you are not the intended recipient of this message, any dissemination, distribution or copying of this message is strictly prohibited. If you received this message in error, please notify the sender by reply email and destroy all copies of the original message. Spring Harbor Hospital Maine's Mental Health Network
|
- [Talk] VB 101 MORRILL,DENISE
- RE: [Talk] VB 101 Rich McNeil
- FW: [Talk] VB 101 Rich McNeil
- RE: [Talk] VB 101 Benjamin, Morris
- RE: [Talk] VB 101 Dwyer, Tom
- RE: [Talk] VB 101 MORRILL,DENISE
- RE: [Talk] VB 101 Dwight Clevenger
- RE: [Talk] VB 101 Dickens, David
- RE: [Talk] VB 101 David Shelby
