Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hey
Is it possible to count the number of times someone printed something in a spreadhseet? For instance lets say I in workbook "Test.xls" and worksheet "Todd". Lets say I run the following code 5 times: Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut If this is the case I need for the counter to keep track and see this was my 5th time printing. Thank you Todd Huttenstine |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Todd
you could use the Beforeprint workbook event and store a value in your sheet (or in a static variable) -- Regards Frank Kabel Frankfurt, Germany Todd Huttenstine wrote: hey Is it possible to count the number of times someone printed something in a spreadhseet? For instance lets say I in workbook "Test.xls" and worksheet "Todd". Lets say I run the following code 5 times: Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut If this is the case I need for the counter to keep track and see this was my 5th time printing. Thank you Todd Huttenstine |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How would I do that as a static variable?
-----Original Message----- Hi Todd you could use the Beforeprint workbook event and store a value in your sheet (or in a static variable) -- Regards Frank Kabel Frankfurt, Germany Todd Huttenstine wrote: hey Is it possible to count the number of times someone printed something in a spreadhseet? For instance lets say I in workbook "Test.xls" and worksheet "Todd". Lets say I run the following code 5 times: Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut If this is the case I need for the counter to keep track and see this was my 5th time printing. Thank you Todd Huttenstine . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
using the Beforeprint event put something like the following in your workbook module: Private Sub Workbook_BeforePrint(Cancel As Boolean) Static print_count print_count = print_count + 1 MsgBox "print Job: " & print_count End Sub Note: This will also count the print preview If you invoke the printing from a macro use something like the following: sub foo() static print_count Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut print_count = print_count + 1 MsgBox "print Job: " & print_count end sub -- Regards Frank Kabel Frankfurt, Germany Todd Huttenstine wrote: How would I do that as a static variable? -----Original Message----- Hi Todd you could use the Beforeprint workbook event and store a value in your sheet (or in a static variable) -- Regards Frank Kabel Frankfurt, Germany Todd Huttenstine wrote: hey Is it possible to count the number of times someone printed something in a spreadhseet? For instance lets say I in workbook "Test.xls" and worksheet "Todd". Lets say I run the following code 5 times: Worksheets("Wkly Renewals").Range("D7:F" & RngCounter + 2).PrintOut If this is the case I need for the counter to keep track and see this was my 5th time printing. Thank you Todd Huttenstine . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combining Print Jobs Together | Excel Discussion (Misc queries) | |||
Excel print jobs | Excel Discussion (Misc queries) | |||
my excel is converting all my print jobs to print to file why? | Excel Discussion (Misc queries) | |||
single print job generates many print jobs | Excel Discussion (Misc queries) | |||
print jobs | Excel Discussion (Misc queries) |