Printer Selection in VBA

belgo -  
tyranausor Posted messages 3501 Registration date   Status Member Last intervention   -
Hello,
I have a little problem selecting a printer in VBA.
I want to print a UserForm with the printer of my choice.
I can open the dialog box, but when I select the printer, it only changes the Excel printer and not the Microsoft Visual Basic printer (Developer tab/Visual Basic).
However, it is on this printer that my userform gets printed.
I also tried changing the default printer when opening the userform, and the same result occurs: the Excel printer changes fine, but not the one for Microsoft Visual Basic.
Thank you for your help.

1 answer

  1. tyranausor Posted messages 3501 Registration date   Status Member Last intervention   2 061
     
    Hello, VBA uses the same printer as the one selected in Excel. Lastly, I don’t quite understand.
    0