VBA to generate PDF problem & how I resolved it (file tagged by date and printing error)

amandabstewart

New Member
Joined
Aug 4, 2014
Messages
45
I've had a VBA macro heavy spreadsheet I've been using a long time. I've had 2 problems and here are the fixes in case anyone has a similar problem.

Problem 1: Macro to name file by date was a major headache I solved by making a "save file as" cell on the sheet that I type the name of the file.
No matter what format you have selected, it seems that Excel just can’tsave the file as the date string, even when I used only numbers. The type-in box solved that problem.

Problem #2: afterusing this sheet for a year, when I tried to autogenerate the PDF file, thespacing was insane! It wouldn’t make asingle sheet of the data, even though the macro had not changed. The problem was that a different printer (a Waspbarcode direct thermal printer) had been selected as the default. Since the spacing on the label defaults isFAR from 8.5x11, the PDF was all screwed up. When I found this error, changing the default printer to one that usesstandard paper, the problem went away.

So, in case you have these issues, these are simple (and nonmacro) fixes to the problem.

Using the “create pdf” macro has saved me hours oflabor!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,743
Messages
6,180,686
Members
452,994
Latest member
Janick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top