Copy/Paste Macro and Column Sizing

G

Guest

Hi,
I've written a simple macro that copy/pastes a specific range from a source
worksheet to a new worksheet. It copy/pastes as values and formats in order
to eliminate formulas and maintain the source formatting. However, I can't
get the column widths to copy over as well. I can't just copy/paste the
whole column becuse the source range can be variable, and it's not the whole
column (there's data below that I don't want to copy/paste). How do I
copy/paste the column widths of a user defined cell range? The user is
defining the cell range by highlighting the range and then running the macro.
Any help would be greatly appreciated. Thanks.
 
F

Frank Kabel

Hi
try reading the columnwidth property of the selected range and set this
width for the target location within your macro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top