View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Help me automate a macro

As I said, you don't need a call to a worksheet function

Format(date,"yyyymmdd")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
application.text(date,"yyyymmdd") is AWESOME! A single line of code
that does exactly what I need.

Now, the last piece of the puzzle is how to run the macro at a given
time each day. Would it be better to set the macro to autorun when
opened and then create a windows scheduled task to open the file every
day, or is there some way to leave the file open and have the macro
automatically kick off at a give time each day?

Tim

JMB wrote:
Or application.text(date,"yyyymmdd") in your code.


" wrote:

I have an Excel report that I have to run every day. It requires one
piece of manually entered data. I have to type in the date in the
format yyyymmdd (ex. 20060713). If I could figure out a way to get
this data into the program automatically, then I could set the macro

to
run on a schedule and I wouldn't have to do it every morning.

Any help is appreciated.

TIm