HardAtWork
Board Regular
- Joined
- Sep 17, 2010
- Messages
- 52
Here's my problem...thought hard about it and now I'm stuck.
I have a workbook that has a dark and a light mode. Ie. Dark mode the background is black and letters are white...and Light mode is the opposite.
Within the sheets there are numerous things that are selected to change color also...along with the font and background.
The user needs to print the document but in light mode even if the screen is in dark mode.
I have the following code to work when printing.
Private Sub Workbook_BeforePrint (Cancel as Boolean)
ApplicationRun. "Light_Mode"
'Sheets change colors
Application.Ontime + TimeValue("00:00:05"), "After Print"
'After print is my dark mode so they can keep typing
End Sub
The problem is that if the user is on page two and hits print it changes the colors of the pages to light (good), but does not stay on the original page he was on (bad)...How can make the code remember what page they were on at the time of print, print that page, and then return to that page when the "After Print" is done running?
A little background on the light and dark mode. The page that appears right after the applicationRun is the last page of the workbook...which is the last page with code changes.
Main Question - Can I get the program to remember what page was selected at the time the print code was activated, change the colors, and return to that page to print the document?
I have a workbook that has a dark and a light mode. Ie. Dark mode the background is black and letters are white...and Light mode is the opposite.
Within the sheets there are numerous things that are selected to change color also...along with the font and background.
The user needs to print the document but in light mode even if the screen is in dark mode.
I have the following code to work when printing.
Private Sub Workbook_BeforePrint (Cancel as Boolean)
ApplicationRun. "Light_Mode"
'Sheets change colors
Application.Ontime + TimeValue("00:00:05"), "After Print"
'After print is my dark mode so they can keep typing
End Sub
The problem is that if the user is on page two and hits print it changes the colors of the pages to light (good), but does not stay on the original page he was on (bad)...How can make the code remember what page they were on at the time of print, print that page, and then return to that page when the "After Print" is done running?
A little background on the light and dark mode. The page that appears right after the applicationRun is the last page of the workbook...which is the last page with code changes.
Main Question - Can I get the program to remember what page was selected at the time the print code was activated, change the colors, and return to that page to print the document?