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

x
?
Solved

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

Posted on 2009-02-10
2
Medium Priority
?
219 Views
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.
0
Comment
Question by:Mike Eghtebas
  • 2
2 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 23605974
Try:

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.


Jeff
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 23695155
;-)

0

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