Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 16, 6:25*pm, GS wrote:
VBA Noob formulated on Tuesday : On Aug 15, 11:08*pm, GS wrote: Jim Cone laid this down on his screen : Another option is to display a list of available printers and have the user choose the printer to use. Selecting an item changes the active printer... '--- Sub PrinterSelectionDemo() *Dim bChoice As Boolean *bChoice = Application.Dialogs(xlDialogPrinterSetup).Show(Act ivePrinter) *If Not bChoice Then * * MsgBox "User cancelled" *Else * *MsgBox ActivePrinter *End If End Sub Nice solution, Jim! Never thought of it myself but this clearly is the best solution in the end. Thanks for sharing this... -- Garry Free usenet access athttp://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc Thanks Jim, I came up with this idea but user then wanted the tick whole workbook option but can tweak you're code to do that. *If Application.ActivePrinter Like "*pdf*" Then * * * * ActiveWorkbook.PrintOut Copies:=1 * * Else * * * * Application.Dialogs(xlDialogPrint).Show * * End If Thanks again to both of you. Danny Why not just show the dialog at all times? Then the user can choose printer AND what to print all in one place! -- Garry Free usenet access athttp://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc Garry, The whole workbook needs to be printed as a PDF. Ideally I would automatically want it to select the users PDF printer but different users may have different versions so not sure if this is possible? Jim's solution is close enough as whatever printer they select I will code it so it will automatically priint the entire workbook so save the user one last click. Danny Danny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save Dialog pops up now - Excel 2007 | Excel Programming | |||
How to capture Excel Save As dialog box? | Excel Programming | |||
Save file dialog box in Excel | Excel Discussion (Misc queries) | |||
Save Excel Worksheet As CSV - No Save As Dialog | Excel Programming | |||
Calling Excel File Save As Dialog | Excel Programming |