Forum Discussion
VBA Programming Assistance
The button being on the form isn't that big of a deal to me but interesting to know you can remove it. Now when I try to save it it pops up with a printer dialog box:
And when I hit "Adobe PDF" I get this:
And then this:
As it pertains to this:
Now clearly I am no expert, barely even a novice, but why it is telling it to print? I didn't see any code that looked like a print command. Is that just the default for pdf?
I'm still trying to figure it out. I cannot duplicate it here. My initial searches indicate that it may be due to having a network printer set as your default for your computer, but my default is a network printer, so I'm reluctant to say that is the cause. Just for giggles, though, you may try changing your default printer to Microsoft XPS Document Writer, or something like that to test the theory.
- Deborah ThornburgSep 20, 2018Copper Contributor
When I switched my default printer to the Microsoft XPS Document Writer it worked perfectly...like a perfect charm. That's strange though, I wonder why it does that with a network printer.
- BobOrrellSep 20, 2018Iron Contributor
Well, Let's see if we can bend it to our will.... I've added a couple lines that gets the current selected printer, changes it to Microsoft XPS Document Writer, goes on to do what it does, and at the end, changes the selected printer back to what it was before. I'm not sure if changing the 'selected' printer in Excel (not the default printer) will do the trick, but I think it's worth a try, right?