Change System Date via VBA

  • Thread starter Thread starter mac_baum
  • Start date Start date
M

mac_baum

How can I change the system date using VBA. I want to go
back one month. However, a general solution would be
appreciated ie change the day ansd/or month and/or year.

Thanks
 
Use Date as a statement instead of a function:

Example:
Date = #7/14/2004#

Something to be aware of, there may be things running on your computer that
rely on the clock, such as scheduled tasks. Rolling the date back and forth
may cause you problems with some of these.
 

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

Back
Top