Hi all,
I am trying to print the userform below by clicking on the "Print" button:
Because I have managed to sort the conditional formatting out in the text boxes, I'll need to be able to print in colour, so will have to choose a printer other than my default option.
Originally the code I used was :
Private Sub CommandButton6_Click()
CommandButton6.Visible = False
CommandButton1.Visible = False
Me.PrintForm
CommandButton6.Visible = True
CommandButton1.Visible = True
End Sub
But this only prints to my default printer. I've searched online and on this forum and have found the following suggestion
Private Sub CommandButton6_Click()
CommandButton6.Visible = False
CommandButton1.Visible = False
Application.Dialogs(xlDialogPrinterSetup).Show
CommandButton6.Visible = True
CommandButton1.Visible = True
End Sub
However when I run this it brings up the different printer options but doesn't print when I click ok. Is there something else I need to add?
Thanks in advance for any assistance!
I am trying to print the userform below by clicking on the "Print" button:
Because I have managed to sort the conditional formatting out in the text boxes, I'll need to be able to print in colour, so will have to choose a printer other than my default option.
Originally the code I used was :
Private Sub CommandButton6_Click()
CommandButton6.Visible = False
CommandButton1.Visible = False
Me.PrintForm
CommandButton6.Visible = True
CommandButton1.Visible = True
End Sub
But this only prints to my default printer. I've searched online and on this forum and have found the following suggestion
Private Sub CommandButton6_Click()
CommandButton6.Visible = False
CommandButton1.Visible = False
Application.Dialogs(xlDialogPrinterSetup).Show
CommandButton6.Visible = True
CommandButton1.Visible = True
End Sub
However when I run this it brings up the different printer options but doesn't print when I click ok. Is there something else I need to add?
Thanks in advance for any assistance!