Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA 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 June 9th, 2004, 09:54 AM
Authorized User
Join Date: May 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default code to force xls file to open after several hours

Hi All

i am tring to write a code to force xls file open by it self when several hours (any number of hours, say 3 hours) has passed..

either pased on a condition Like A1=Now() so when 3 hours paased then, or
based on the computer time so after 3 hours passed then

my try was as follwing (placed in workbook_open) or somewhere else

If A1
getopenfile( file path)
end if

any help is appreciated in advanced

Reply With Quote
  #2 (permalink)  
Old June 16th, 2004, 02:42 AM
Authorized User
Join Date: Jun 2004
Location: Darmstadt, , Germany.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

Running the following subroutine will cause Excel to run the subroutine called "openFile" after 3 hours.

Sub openInThreeHours()
  dtScheduledTime = Now + TimeSerial(3,0,0)
  Application.OnTime dtScheduledTime, "openFile"
End Sub

Hope that helps.

Ne auderis delere orbem rigidum meum!
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
Help! how to read the file of *.xls hussar91404 C# 4 April 25th, 2014 03:41 AM
Reading xls file balesh.mind ASP.NET 2.0 Professional 1 August 27th, 2007 11:54 PM
SQL Code for counting operational hours nancyb Access 1 October 3rd, 2006 12:02 PM
Force A File To Download harpua Classic ASP Basics 6 July 26th, 2004 01:06 PM
Force A File To download harpua Javascript How-To 2 June 23rd, 2004 02:03 PM

All times are GMT -4. The time now is 03:55 PM.

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