Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy Past with macro

Hello all,

I copy a Range and then paste it into new excel workbook. Duiring this
action I use the below code. I can pastespecial the column widths but cant
paste the Row Height. Is there any possibility that I can copy the
RowHeights too??

Sheets(1).Range("A1").PasteSpecial Paste:=xlValues
Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteFormats
Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteColumnWidths
Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteRowHeight ?????????

--
thanx

Murat Demir HEKİMOĞLU
have a nice day!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Copy Past with macro

Height. Is there any possibility that I can copy the
RowHeights too??

Not through Paste Special. You'd have to capture the row height and then
set it explicitly:

Sub a()
Dim RowHt As Single
RowHt = Range("A1").RowHeight
''Later...
Range("A10").RowHeight = RowHt
End Sub


--
Jim
"Murat D. Hekimoğlu" wrote in message
...
| Hello all,
|
| I copy a Range and then paste it into new excel workbook. Duiring this
| action I use the below code. I can pastespecial the column widths but cant
| paste the Row Height. Is there any possibility that I can copy the
| RowHeights too??
|
| Sheets(1).Range("A1").PasteSpecial Paste:=xlValues
| Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteFormats
| Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteColumnWidths
| Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteRowHeight ?????????
|
| --
| thanx
|
| Murat Demir HEKİMOĞLU
| have a nice day!
|
|


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
Macro to Copy/Paste Data into one wksht, skipp one row before past Shoney Excel Discussion (Misc queries) 1 February 22nd 08 01:28 AM
Macro: Insert, copy and past data from sheet Metaldream7 Excel Discussion (Misc queries) 0 November 8th 06 09:31 PM
Copy and Past Joe Excel Discussion (Misc queries) 1 August 17th 06 02:10 AM
copy & past in same format copy/past -in same format-with blank row Excel Discussion (Misc queries) 0 July 27th 06 07:29 PM
Macro to copy and past selected rows only... Jules[_4_] Excel Programming 1 April 14th 04 02:31 PM


All times are GMT +1. The time now is 03:23 PM.

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"