Title: Message
Denise,
 
Perhaps this may help. . .
 
DateAdd("d", -30, Now)
 
Tom
 
-----Original Message-----
From: MORRILL,DENISE [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 24, 2005 2:12 PM
To: Boston Workstation Talk (E-mail)
Subject: [Talk] VB 101

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

This message is intended only for the use of the individual or entity to which this e-mail is addressed. This message may contain information that is privileged and confidential. State and Federal law including, but not limited to the Health Insurance Portability and Accountability Act of 1996 and related regulations, legally protects this information. If you are not the intended recipient of this information or if you are not properly authorized to receive this information, you are hereby notified that any disclosure, copying, distribution, or action taken in reliance on the contents of these documents is strictly prohibited. If you have received this information in error please delete the message with all accompanying attachments, and notify the sender so that we may correct our records.

Reply via email to