ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Multiple Spreadsheets into One Workbook (https://www.excelbanter.com/excel-programming/271761-copy-multiple-spreadsheets-into-one-workbook.html)

Astroplastic

Copy Multiple Spreadsheets into One Workbook
 
I'm having problems with the proper coding notation for the .Copy Sub.
i want to run this via VBScripting or windows scripting but don't
know what to substitute for the ":="

Does anyone know how this would translate into a VBScript?


XL.Application.Workbooks(1).Worksheets(1).Copy After:=Worksheets(i)

thnks

bryan

Astroplastic

Copy Multiple Spreadsheets into One Workbook
 
Tried it. Get the same error as befo "Copy method of worksheet
class failed."

I'm assuming this is due to said syntax. If this is the case, I have
yet to see a working example in WSH/VBS in the groups. Perhaps i'm
going about it the wrong way?












"Patrick Molloy" wrote in message ...
try
XL.Application.Workbooks(1).Worksheets(1).Copy
After:=XL.Application.Workbooks(1).Worksheets(i)
--
Patrick Molloy
Microsoft Excel MVP
----------------------------------
"Astroplastic" wrote in message
om...
I'm having problems with the proper coding notation for the .Copy Sub.
i want to run this via VBScripting or windows scripting but don't
know what to substitute for the ":="

Does anyone know how this would translate into a VBScript?


XL.Application.Workbooks(1).Worksheets(1).Copy After:=Worksheets(i)

thnks

bryan



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

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