I have a workbook with multiple sheets, some of which are hidden. Currently I have a button on a userform with this code for printing
This works for printing the listed sheets but I would like to hide the sheets I am going to print (175, RAW, LFR) so that the user interfaces with my userform and just prints the sheets. Hiding the sheets causes my print routine to fail. I know I have to unhide during the printing process but I have not been able to write the code to make it work. Anyone have any suggestions? I have found multiple routines using screen updating on the forum but haven't been able to make anything fit what I am doing.
Thanks
Code:
Private Sub cmd_printfltplan_Click()
Dim Printx As String
Dim sCurrentPrinter As String
'Setting the current printer to the active printer
sCurrentPrinter = ActivePrinter
ActivePrinter = sCurrentPrinter
Printx = InputBox("How many copies would you like?")
Sheets(Array("175", "RAW", "LFR")).PrintOut Copies:=Printx
End Sub
This works for printing the listed sheets but I would like to hide the sheets I am going to print (175, RAW, LFR) so that the user interfaces with my userform and just prints the sheets. Hiding the sheets causes my print routine to fail. I know I have to unhide during the printing process but I have not been able to write the code to make it work. Anyone have any suggestions? I have found multiple routines using screen updating on the forum but haven't been able to make anything fit what I am doing.
Thanks