[AccessD] copying worksheets

Hale, Jim Jim.Hale at FleetPride.com
Tue Sep 12 13:37:35 CDT 2006


I think you need to use worksheets, not worksheet, ie
          appexcel.Worksheets(7).Copy After:=Worksheets(3)
HTH
Jim Hale
         

-----Original Message-----
From: Billy Pang [mailto:tuxedoman888 at gmail.com]
Sent: Tuesday, September 12, 2006 1:19 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] copying worksheets


Hello:

>From Access, I'm trying to make a copy of a worksheet within an instance of
Excel that is created at runtime in VBA.

xlsheet.copy after:=activesheet

However, I get the following error message.

Run-time error '5'

Invalid procedure call or argument
Any ideas?

Many thanks in advance,
Billy

-- 
Billy Pang
http://dbnotes.blogspot.com/
"Once the game is over, the King and the pawn go back in the same box." -
Italian proverb
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the AccessD mailing list