ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying an entire sheet from 2007 to 2003 (https://www.excelbanter.com/excel-programming/417505-copying-entire-sheet-2007-2003-a.html)

XP

Copying an entire sheet from 2007 to 2003
 
Using Office 2007 with Windows XP; working in compatibility mode for 2003;

We have a legacy program in which a series of sheets are copied from an
Office 2007 file into Office 2003 Files. However, we find that this cannot
even be done manually because the relative sheet sizes are different.

These sheets do not contain data below about 3000 rows, so nothing would be
lost if the sheets were cropped during the copy procedure (at the moment the
entire sheets are copied).

What are my options? We need to keep the source files in 2003 format for
many users to have access. Revert to Office 2003 in the program file? - is
that the only realistic option here or is it possible to somehow force a copy
and crop the sheet?

Many thanks for your assistance.

Bob Flanagan[_2_]

Copying an entire sheet from 2007 to 2003
 
There are lots of solution. Assuming you have an entry in cell A1, you can
do (untested)

Range("A1").select
ActiveSheet.Usedrange.copy
'code to change to destination workbook/sheet and select cell A1
Activesheet.paste

You can of course eliminate the selects, but sometimes it is easier <grin

If you just want values and formats, you can do a pastespecial and specify
them instead. If you need column widths, you can copy the widths
indvidually by looping through the columns.

Robert Flanagan
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"XP" wrote in message
...
Using Office 2007 with Windows XP; working in compatibility mode for 2003;

We have a legacy program in which a series of sheets are copied from an
Office 2007 file into Office 2003 Files. However, we find that this cannot
even be done manually because the relative sheet sizes are different.

These sheets do not contain data below about 3000 rows, so nothing would
be
lost if the sheets were cropped during the copy procedure (at the moment
the
entire sheets are copied).

What are my options? We need to keep the source files in 2003 format for
many users to have access. Revert to Office 2003 in the program file? - is
that the only realistic option here or is it possible to somehow force a
copy
and crop the sheet?

Many thanks for your assistance.





All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com