Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default problem with cell sizes

have a question...

i have a button that opens a new book, copy data from one book to th
new one. problem i can seem to solve is when i copy the data from th
first book to the second. it doesnt copy the cell sizes. on the firs
book i have all different sizes of cells, on the second its default
how do i get the cell sizes to change to match the first book.

thanks

-dere

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default problem with cell sizes

The cell sizes are determined by row depths and column widths. Try doing this (manually and/or recorded to put in code) - highlight the entire columns (say A:G), copy, then in the destination sheet highlight the same columns, paste special, paste formats. the yellow paintbrush tool (format painter) in the toolbar is a quicker way of doing this

"derekc " wrote:

have a question...

i have a button that opens a new book, copy data from one book to the
new one. problem i can seem to solve is when i copy the data from the
first book to the second. it doesnt copy the cell sizes. on the first
book i have all different sizes of cells, on the second its default.
how do i get the cell sizes to change to match the first book.

thanks

-derek


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default problem with cell sizes

that worked perfectly, thanks a bunc

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default problem with cell sizes

well thaught it worked, im getting an error 1004 when trying to cop
columnwidths, heres what i have

Private Sub CommandButton3_Click()
Range("A1:Q22").Select
Selection.Copy
Workbooks.Add
Selection.Insert Shift:=xlToRight
Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub

i get the error at the selection.pasespecial line

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Sizes RK11 Excel Discussion (Misc queries) 1 September 25th 09 01:10 AM
Worksheet formula problem - serving sizes! LizzieP Excel Worksheet Functions 1 October 13th 06 10:38 PM
cell sizes jnf Excel Worksheet Functions 2 March 28th 06 10:31 PM
Excel: want header cell sizes to differ from the other sheet cell. mayrl Excel Discussion (Misc queries) 0 January 18th 06 06:41 PM
Changing cell sizes FlyBye Excel Discussion (Misc queries) 2 April 1st 05 02:32 AM


All times are GMT +1. The time now is 01:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"