RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
-
- 2010
- Platform
-
- Windows
Hi there, I have several printers and I want to be able to define 2 separate printers for 2 different tasks within Excel via vba and display them within a couple of cells...
I can activate the 'select printer' dialog box using:
and I want to send this info to Sheets("Project").Range("I15") & Sheets("Project").Range("I17") respectively
Then when I click my 'print' buttons which currently are hardcoded:
to change each of the ActivePrinter:= to the value of Sheets("Project").Range("I15") & Sheets("Project").Range("I17") respectively
I'm not sure if I've explained this particularly well, but I'm looking for a way for the user to define the 2 separate printers which are then activated by the 2 print buttons
If you can point me in the right direction, that'd be splendid
I can activate the 'select printer' dialog box using:
Code:
Sub SetupReportPrinter(control As IRibbonControl)
Application.Dialogs(xlDialogPrinterSetup).Show
End Sub
Sub SetupLabelPrinter(control As IRibbonControl)
Application.Dialogs(xlDialogPrinterSetup).Show
End Sub
Then when I click my 'print' buttons which currently are hardcoded:
Code:
Sub PrintRecord(control As IRibbonControl)
On Error Resume Next
With Worksheets("Record")
'.Activate
.PrintOut Preview:=True, ActivePrinter:="iR C2380"
End With
End Sub
Sub PrintLabels(control As IRibbonControl)
On Error Resume Next
With Worksheets("Labels")
'.Activate
.PrintOut Preview:=True, ActivePrinter:="LabelPrinter"
End With
End Sub
I'm not sure if I've explained this particularly well, but I'm looking for a way for the user to define the 2 separate printers which are then activated by the 2 print buttons
If you can point me in the right direction, that'd be splendid