![]() |
Count Print Jobs
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 |
Count Print Jobs
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 |
Count Print Jobs
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 . |
Count Print Jobs
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 . |
All times are GMT +1. The time now is 06:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com