ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   print/save macros (https://www.excelbanter.com/excel-programming/395701-print-save-macros.html)

andrewbt

print/save macros
 
hello everybody.
My print macro is currently like this
Sub FinalOrderPrintWorkbook()
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
sht.PrintOut
Next sht
End Sub

My boss has now decided that because the world revolves around salesmen the
macro should not automatically print but should bring up the print screen,
you know, the one where they can choose a printer and the print settings
e.t.c. any help with changing this to bring up the print screen or something
new would be much appreciated. Oh and on a separate note any code that can
be attached to a button that triggers the save as command would be fantastic.
Thankyou in advance.
Andrewbt


JLGWhiz

print/save macros
 
If salesmen were not so helpless, there would be no need for those with
computer expertise. Be thankful for dumb salesmen.

"andrewbt" wrote:

hello everybody.
My print macro is currently like this
Sub FinalOrderPrintWorkbook()
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
sht.PrintOut
Next sht
End Sub

My boss has now decided that because the world revolves around salesmen the
macro should not automatically print but should bring up the print screen,
you know, the one where they can choose a printer and the print settings
e.t.c. any help with changing this to bring up the print screen or something
new would be much appreciated. Oh and on a separate note any code that can
be attached to a button that triggers the save as command would be fantastic.
Thankyou in advance.
Andrewbt


Halim

print/save macros
 
Hi,

Why you don't use dialogs command like:
Sub FinalOrderPrintWorkbook()
Dim PrtDialog As Dialog
Set PrtDialog = Application.Dialogs(xlDialogPrint)
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
PrtDialog.Show
Next sht
End Sub

--
Regards,

Halim



"andrewbt" wrote:

hello everybody.
My print macro is currently like this
Sub FinalOrderPrintWorkbook()
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
sht.PrintOut
Next sht
End Sub

My boss has now decided that because the world revolves around salesmen the
macro should not automatically print but should bring up the print screen,
you know, the one where they can choose a printer and the print settings
e.t.c. any help with changing this to bring up the print screen or something
new would be much appreciated. Oh and on a separate note any code that can
be attached to a button that triggers the save as command would be fantastic.
Thankyou in advance.
Andrewbt



All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com