Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
print-out time | Excel Programming | |||
how can I look at more than one page at the same time in print pr. | Excel Discussion (Misc queries) | |||
Add 1 to a number each time you print | Excel Programming | |||
Print Odd/ Even or specified pages in excel at a time. | Excel Discussion (Misc queries) | |||
how can I get all worksheets to print at one time? | Excel Worksheet Functions |