Hi All,
I have created a protected staff scheduling worksheet in Excel 2010 with over twenty command buttons and one toggle button, three of which are used to print different sections of the schedule.
I can select one of the print command buttons, change print settings and print normally from the print preview and the worksheet will return to its normal state after selecting print. However, if I choose to exit the print preview without printing, via the close print preview button, upon returning to the work sheet all the text on every command button and the toggle button has been enlarged.
All three print buttons use similar code:
Private Sub CommandButton23_Click()
'PRINT HOLIDAY/TOIL
ActiveSheet.Unprotect
Application.ScreenUpdating = False
Range("A2:X34").Select
Selection.PrintOut Preview:=True
Range("E13").Select
Application.ScreenUpdating = True
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
End Sub
Private Sub CommandButton24_Click()
'PRINT SCHEDULE
ActiveSheet.Unprotect
Application.ScreenUpdating = False
ActiveSheet.Rows("13:34").Hidden = True
Range("A2:X119").Select
Selection.PrintOut Preview:=True
ActiveSheet.Rows("13:34").Hidden = False
Range("E13").Select
Application.ScreenUpdating = True
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
End Sub
Private Sub CommandButton25_Click()
'PRINT EVENING SALES
ActiveSheet.Unprotect
Application.ScreenUpdating = False
ActiveSheet.Rows("13:34").Hidden = True
Range("A2:X160").Select
Selection.PrintOut Preview:=True
ActiveSheet.Rows("13:34").Hidden = False
Range("E13").Select
Application.ScreenUpdating = True
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
End Sub
If I click the toggle button after the text has been enlarged, the text in some of the command buttons reverts back to normal but others remain in an enlarged text state. The only way all buttons appear to revert back to normal is if I select one of the print buttons again and then print instead of exiting the print preview.
It is the command button text only not the button size that is effected. Does anyone have any idea what is causing this issue?
Many thanks,
Bookmarks