#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Print time

In cell H87 I have the formula below which of course gives the time the file
is opened, but it seems I need to have the time the worksheet is printed.
The workbook tends to be open most of the day and is printed each time a
change is made.

=NOW()

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Print time

not sure i understand, but you can add something like this to the beginning of
your print routine

worksheets("Sheet1").range("D5").calculate
--


Gary


"Patrick C. Simonds" wrote in message
...
In cell H87 I have the formula below which of course gives the time the file
is opened, but it seems I need to have the time the worksheet is printed. The
workbook tends to be open most of the day and is printed each time a change is
made.

=NOW()



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Print time

hi
this macro might do it.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("A1").Value = Time ' change to suit
' or if you need each time printed for records...
'Range("A65000").End(xlUp).Offset(1, 0).Value = Time
End Sub

regards
FSt1
"Patrick C. Simonds" wrote:

In cell H87 I have the formula below which of course gives the time the file
is opened, but it seems I need to have the time the worksheet is printed.
The workbook tends to be open most of the day and is printed each time a
change is made.

=NOW()


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Print time

Maybe you could use the workbook_beforeprint event to have excel calculate.
Then the time/date will update.

This would go under the ThisWorkbook module:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.Calculate
End Sub


"Patrick C. Simonds" wrote:

In cell H87 I have the formula below which of course gives the time the file
is opened, but it seems I need to have the time the worksheet is printed.
The workbook tends to be open most of the day and is printed each time a
change is made.

=NOW()


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Print time

You can do what you want by using a workbook event procedure. Right click
the Excel icon immediately to the left of the File menu item, select View
Code from the menu that pops up and copy/paste this code into the code
window that opened up...

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Worksheets("Sheet1").Range("H87").Value = Now
End Sub

Note that I was not entirely clear which worksheet you wanted this date in,
so I assumed Sheet1 for example purposes. What confused me somewhat is that
you said "...the time the WORKSHEET is printed" {emphasis mine}. If you
meant that you want the time saved on the particular worksheet you were
printing, then, assuming that worksheet would always be the active sheet
when you were printing it, just change the Worksheets("Sheet1") reference to
ActiveSheet instead. If you have some other need for where this date is
stored, you will have to provide a more detailed description of your needs.

Rick


"Patrick C. Simonds" wrote in message
...
In cell H87 I have the formula below which of course gives the time the
file is opened, but it seems I need to have the time the worksheet is
printed. The workbook tends to be open most of the day and is printed each
time a change is made.

=NOW()


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
print-out time excel-tr Excel Programming 3 April 30th 07 04:54 AM
how can I look at more than one page at the same time in print pr. aed admin Excel Discussion (Misc queries) 1 October 5th 06 02:24 AM
Add 1 to a number each time you print Jason1[_2_] Excel Programming 4 June 14th 06 08:02 PM
Print Odd/ Even or specified pages in excel at a time. NAVEEN Excel Discussion (Misc queries) 0 February 21st 06 10:31 AM
how can I get all worksheets to print at one time? Sofia Excel Worksheet Functions 2 April 19th 05 07:13 PM


All times are GMT +1. The time now is 04:41 PM.

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

About Us

"It's about Microsoft Excel"