[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


In Access, copy Sheet1 from Source.xls over Sheet1 in Target.xls

Posted on 2009-02-10
Medium Priority
Last Modified: 2013-11-27
The code below coppies certain range.

wsModel.Range("A1:Z500").Copy Destination:=ws.Range("A1:Z500")

Question: How can I change it to copy the entire Sheet1 (from wsModel to/over ws)?

Note: Both wsModel and ws have Sheet1 on them.

Thank you.
Question by:Mike Eghtebas
  • 2
LVL 74

Accepted Solution

Jeffrey Coachman earned 2000 total points
ID: 23605974

wsModel.Range("A1:IV65536").Copy Destination:=ws.Range("A1:IV65536")
For Access 2003 and lower.

wsModel.Range("A1:IXFD1048576").Copy Destination:=ws.Range("A1:XDF1048576")
For Excel 2007.

LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 23695155


Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question