View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Copy/Paste Macro and Column Sizing

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

--
Regards
Frank Kabel
Frankfurt, Germany

"JimK" schrieb im Newsbeitrag
...
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.