Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Access 2003 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2003 VBA Programmer's Reference by Patricia Cardoza, Teresa Hennig, Graham Seach, Armen Stein; ISBN: 9780764559037
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2003 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 8th, 2013, 11:08 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default auto macro run in Excel


I used this code to automate my macro
Private Sub Workbook_Open()

Application.OnTime TimeValue("08:58:00"), "RUN"
Application.OnTime TimeValue("09:00:00"), "RUN"
Application.OnTime TimeValue("10:00:00"), "RUN"
Application.OnTime TimeValue("11:50:00"), "RUN"
Application.OnTime TimeValue("12:00:00"), "RUN"
Application.OnTime TimeValue("13:00:00"), "RUN"
Application.OnTime TimeValue("13:10:00"), "RUN"
Application.OnTime TimeValue("14:00:00"), "RUN"
Application.OnTime TimeValue("15:00:00"), "RUN"
Application.OnTime TimeValue("15:33:00"), "RUN"
Application.OnTime TimeValue("16:00:00"), "RUN"
Application.OnTime TimeValue("16:30:00"), "RUN"
Application.OnTime TimeValue("17:00:00"), "RUN"
Application.OnTime TimeValue("17:30:00"), "RUN"
Application.OnTime TimeValue("18:00:00"), "RUN"
Application.OnTime TimeValue("19:00:00"), "RUN"
Application.OnTime TimeValue("20:00:00"), "RUN"

End Sub
Sub RunAMacro()

Application.RUN "path'!RUN"

End Sub

But the problem is...If my cursor is placed on other excel sheet at above mentioned time then macro executed in that sheet not in 'Path'
Could any one suggest the currect code.
*Path - File path
*Run - Macro name

I guess one loop is required to identify the file..Please suggest me and suggest me how to minimize the code to auto run the macro with 15min interval.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto run the macro psukanya BOOK: Excel VBA 24-Hour Trainer 0 April 8th, 2013 09:35 PM
Run excel and execute macro dyung2 C++ Programming 1 October 23rd, 2009 05:10 PM
Help: Disable the "Shift Key" on macro Auto run ofAlexander Word VBA 1 June 24th, 2007 03:16 AM
Run macro when exit/close excel dgilford Excel VBA 1 September 8th, 2005 02:42 AM

All times are GMT -4. The time now is 12:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.