Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Excel VBA setting column width  (Read 10616 times)

0 Members and 1 Guest are viewing this topic.

Brad Emerick

  • Guest
Excel VBA setting column width
« on: January 11, 2005, 08:54:28 AM »
Hi all.  I am using columns B:E to print on 4" labels.  Different data goes in to three of these cells when the user runs the macro, and I use ".AutoFit" to set the cell width on these three columns.  Last of all, I want to set the width of column D so that columns B:E add to 4".  Using ".Width" differs from ".ColumnWidth", but neither of these give the pixel number (when compared to clicking the right side of the column on the column bar).
So how can I set the width of column D to equal 4 inches minus the sum of columns B, C and E?

Note: This spreadsheet will be opened on different users' desktops of which will have different screen resolutions than I have.

Thank you, Brad.