Auto-size column error

rockchalk33

Board Regular
Joined
Jan 12, 2016
Messages
111
Hey all,

So the title of my post is slightly misleading...Some time ago I created two unique programs both serving the same purpose, to take data, organize it, then reproduce it on a PDF format.

This has been working without any type of hiccup until this last week when both programs (that's the super weird and confusing part) will generate PDF documents but neither of which the auto-size column code is working because both ultimately have "#####" somewhere on the document.

If anyone can give me any idea or throw out a thought as to why this would occur after working for many months and then randomly do this on two separate machines?

The code for both programs is very expansive and long. As a troubleshoot, I've gone in and tried to autofit each individual column at the end of my code (didn't work) and then have rearranged the order of auto-fitting different columns (still didn't work) to see if that would fix the issue but there is still no change.

Thanks,

Devin
 
Last edited:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Sometimes different printers and different form creation tools such as PDF creators deal with fonts a little differently. See if this helps. You want to auto size the column and then make it a little bit bigger to allow for minor font differences.

Code:
Columns("D:D").EntireColumn.AutoFit
Columns("D:D").ColumnWidth = Columns("D:D").ColumnWidth + 0.1
 
Upvote 0

Forum statistics

Threads
1,215,388
Messages
6,124,648
Members
449,177
Latest member
Sousanna Aristiadou

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