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

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.
LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?
 
Jeffrey CoachmanMIS LiasonCommented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
;-)

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.