Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Copy row/column size, print area...to other tabs

Hi,

Is it possible to copy row/column size, hidden columns/rows, print area,
margins, header/footers from one tab to another tab and also to other tabs in
other workbooks with a simple macro? I'm currently recorded the adjustments
and applying it to each tab.

Thanks,
Carmen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy row/column size, print area...to other tabs

yes, you can read and write most of these properties.

worksheets("Sheet2").Range("A1").EntireColumn.Colu mnWidth = _
worksheets("Sheet1").Range("A1").EntireColumn.Colu mnWidth

You can get the names of the properties by turning on the macro recorder and
manually changing some of them, then turn off the macro recorder and look at
the recorded code.

--
Regards,
Tom Ogilvy


as an example.
"Carmen" wrote:

Hi,

Is it possible to copy row/column size, hidden columns/rows, print area,
margins, header/footers from one tab to another tab and also to other tabs in
other workbooks with a simple macro? I'm currently recorded the adjustments
and applying it to each tab.

Thanks,
Carmen

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Copy row/column size, print area...to other tabs

Hi Carmen,

Do I assume that you are trying to make an exact duplicate of the worksheet?
If so, right click on the tab name and select Move or Copy and check the box
bottom left to copy and if to another workbook click on the drop down arrow
beside the workbook name and select the required workbook or new workbook. If
you are trying to copy into an existing workbook then the existing workbook
needs to be open.

However, if you are trying to copy to an existing worksheet then it does not
work but if copying the entire worksheet, simply delete the existing one and
rename the new one.

Regards,

OssieMac

"Carmen" wrote:

Hi,

Is it possible to copy row/column size, hidden columns/rows, print area,
margins, header/footers from one tab to another tab and also to other tabs in
other workbooks with a simple macro? I'm currently recorded the adjustments
and applying it to each tab.

Thanks,
Carmen

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Copy row/column size, print area...to other tabs


Hi OssieMac,

I currently have a file with 20+tabs, some probably with more columns hidden
than the others. I need to create a macro to save each one of them in
individual files, and at the same time I need to set up their print area,
size particular cells, hide certain rows, etc. Since this macro will be used
with many similar scenarios (saving tabs to individual files), I want to make
it as generic as possible. So I would like user to identify a tab with the
desired format, hidden columns/rows, print setup... and then be able to copy
the properties to all other tabs as they are being copied.

Is this possible?

Thanks,
Carmen




"OssieMac" wrote:

Hi Carmen,

Do I assume that you are trying to make an exact duplicate of the worksheet?
If so, right click on the tab name and select Move or Copy and check the box
bottom left to copy and if to another workbook click on the drop down arrow
beside the workbook name and select the required workbook or new workbook. If
you are trying to copy into an existing workbook then the existing workbook
needs to be open.

However, if you are trying to copy to an existing worksheet then it does not
work but if copying the entire worksheet, simply delete the existing one and
rename the new one.

Regards,

OssieMac

"Carmen" wrote:

Hi,

Is it possible to copy row/column size, hidden columns/rows, print area,
margins, header/footers from one tab to another tab and also to other tabs in
other workbooks with a simple macro? I'm currently recorded the adjustments
and applying it to each tab.

Thanks,
Carmen

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy row/column size, print area...to other tabs

sh1.cells.copy
Activesheet.Cells.pasteSpecial xlFormats

This won't work for print settings. Again, you can record a macro to see
how to get the properties of the pagesetup object.

--
Regards,
Tom Ogilvy


"Carmen" wrote:


Hi OssieMac,

I currently have a file with 20+tabs, some probably with more columns hidden
than the others. I need to create a macro to save each one of them in
individual files, and at the same time I need to set up their print area,
size particular cells, hide certain rows, etc. Since this macro will be used
with many similar scenarios (saving tabs to individual files), I want to make
it as generic as possible. So I would like user to identify a tab with the
desired format, hidden columns/rows, print setup... and then be able to copy
the properties to all other tabs as they are being copied.

Is this possible?

Thanks,
Carmen




"OssieMac" wrote:

Hi Carmen,

Do I assume that you are trying to make an exact duplicate of the worksheet?
If so, right click on the tab name and select Move or Copy and check the box
bottom left to copy and if to another workbook click on the drop down arrow
beside the workbook name and select the required workbook or new workbook. If
you are trying to copy into an existing workbook then the existing workbook
needs to be open.

However, if you are trying to copy to an existing worksheet then it does not
work but if copying the entire worksheet, simply delete the existing one and
rename the new one.

Regards,

OssieMac

"Carmen" wrote:

Hi,

Is it possible to copy row/column size, hidden columns/rows, print area,
margins, header/footers from one tab to another tab and also to other tabs in
other workbooks with a simple macro? I'm currently recorded the adjustments
and applying it to each tab.

Thanks,
Carmen



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
error: "the copy area & the paste area are not the same size & sh Janis Excel Discussion (Misc queries) 1 September 7th 07 10:58 PM
Macro: how to set a print area of varying size? Dave D Excel Discussion (Misc queries) 1 September 19th 06 12:50 PM
Excel print area size Tom Excel Programming 5 August 10th 05 09:22 PM
set the print area print multiple tabs veng Excel Discussion (Misc queries) 5 February 12th 05 07:01 PM
print pages when text area changes in size dizzy Excel Programming 0 January 25th 04 01:28 AM


All times are GMT +1. The time now is 02:52 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"