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.
 
Back
Top