Colin Mannion
Member
HI
I am trying to put together a simple Print Button - hope someone can help.
I have a top sheet which is heavily graphic and coloured, and want to reduce the amount of toner being used when printed. The top sheet with the graphic is called Brand Dashboard, and there is a direct copy of that sheet - Table Print - which pulls through only the required data tables which have a print area of B1
42.
Have had a go (see code below), but the selection seems to get lost when the macro reaches the print preview dialogue, and not sure the DoEvents statement is having the desired effect of waiting until the user has edited the print dialogue for number of copies/name of printer before returning to the Brand dashboard sheet.
Can you tell me where I've gone wrong?
Thanks in advance.
Colin
Sub CommandButton1_Click()
' Select_Data_For_Printing Macro
'
Sheets("TABLE PRINT").Select
Sheets("TABLE PRINT").Range("B1
42").Select
Application.CommandBars.ExecuteMso ("PrintPreviewAndPrint")
DoEvents
Sheets("Brand Dashboard").Select
Sheets("Brand Dashboard").Range("a1").Select
End Sub
▬▬▬▬▬▬▬▬▬ Mod edit : thread moved to appropriate forum !
I am trying to put together a simple Print Button - hope someone can help.
I have a top sheet which is heavily graphic and coloured, and want to reduce the amount of toner being used when printed. The top sheet with the graphic is called Brand Dashboard, and there is a direct copy of that sheet - Table Print - which pulls through only the required data tables which have a print area of B1
Have had a go (see code below), but the selection seems to get lost when the macro reaches the print preview dialogue, and not sure the DoEvents statement is having the desired effect of waiting until the user has edited the print dialogue for number of copies/name of printer before returning to the Brand dashboard sheet.
Can you tell me where I've gone wrong?
Thanks in advance.
Colin
Sub CommandButton1_Click()
' Select_Data_For_Printing Macro
'
Sheets("TABLE PRINT").Select
Sheets("TABLE PRINT").Range("B1
Application.CommandBars.ExecuteMso ("PrintPreviewAndPrint")
DoEvents
Sheets("Brand Dashboard").Select
Sheets("Brand Dashboard").Range("a1").Select
End Sub
▬▬▬▬▬▬▬▬▬ Mod edit : thread moved to appropriate forum !