Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Scheduled print of a excel doc that is always open

Hi All,


I am fairly new to excel and have managed to end up having to create something i feel way over my head !!


I am trying to get a excel spreadsheet that is open 24/7 on a desktop to print out every morning at 05:00

But i do not know how to do this.

The document is open 24/7 and is being constantly updated by a production machine giving us live data (ddeserver)


We want this to print at 05:00 hours as as 05:00 the counters get reset and start back at 0 (so when we start work at eight the figures mean nothing to us)


The workbook contain 4 tabs on the bottom and only 2 need printing.



Can somebody help me in how to do this please?



Regards

Ben Wright
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Scheduled print of a excel doc that is always open

This little macro should du the trick:

Sub Print_At_Five()

ActiveSheet.PrintOut
Application.OnTime TimeValue("05:00:00"), "Print_At_Five"

End Sub


First time the macro is run, it will print the current active sheet, and
then do it over again everytime the clock reaches 05:00, as long as the
spreadsheet is not closed.


CE



Den 18.05.2012 14:41, Ben Wright skrev:
Hi All,


I am fairly new to excel and have managed to end up having to create
something i feel way over my head !!


I am trying to get a excel spreadsheet that is open 24/7 on a desktop to
print out every morning at 05:00

But i do not know how to do this.

The document is open 24/7 and is being constantly updated by a
production machine giving us live data (ddeserver)


We want this to print at 05:00 hours as as 05:00 the counters get reset
and start back at 0 (so when we start work at eight the figures mean
nothing to us)


The workbook contain 4 tabs on the bottom and only 2 need printing.



Can somebody help me in how to do this please?



Regards

Ben Wright




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default Scheduled print of a excel doc that is always open

Hmm,

If the counters get reset at 5.00am would it not be prudent to do the
print outs a minute earlier to avoid running head on into that process.

Charlotte, I feel this would require activation of the OnTime Event.

I use the following to Enable/Disable an AutoSave feature...

Option Explicit
Public RunTime

Sub StartTimer()

RunTime = TimeValue("04:59:00")
Application.OnTime RunTime, "Print_At_Five", schedule:=True

End Sub

Sub Print_At_Five()

Dim my1stSht as worksheet, my2ndSht as worksheet

Set my1stSht = Sheets("Your 1st Sheet")
Set my2ndSht = Sheets("Your 2nd Sheet")

my1stSht.PrintOut
my2ndSht.PrintOut


End Sub

Create a Macro button on your main sheet somewhere out of the way and
"Assign Macro" ( StartTimer ) to the button and click to activate.

HTH
Mick.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbooks.Open fails in scheduled job OssieMac Excel Programming 3 November 3rd 09 07:58 AM
Workbooks.Open fails in scheduled job joel[_154_] Excel Programming 1 November 2nd 09 02:13 PM
How to open multi-workbooks w/ Window Scheduled Task? March Excel Programming 2 January 21st 09 07:41 PM
Open the Excel Workbooks in Windows Scheduled Task March Excel Programming 0 January 20th 09 06:08 PM
Open workbook with scheduled tasks? [email protected] Excel Programming 1 May 31st 05 11:16 AM


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"