Sign in to follow this  
Followers 0
joeloyzaga

copy all worksheets from workbook A to B

5 posts in this topic

I have this workbook - BiztalkClient280502JOE.xls (call this A) which contains data within multiple worksheets and I want to copy all worksheets  into workbook B. If they already exist then don't copy them over.

I want to run this from a .vbs so I will need to use parameters (workbookFROM, workbookTO) I guess. 

I have this code that I have used before to run an exe but I don't know how to run an exe with params...

Set oAutoIt = CreateObject("AutoItX3.Control")
    oAutoIt.Run("C:pwcCriteria-Select.exe")

Share this post


Link to post
Share on other sites



You're asking a vbs question on an AutoIt forum?? If you want to accomplish it with AutoIt, look in the help file under the _Excel functions.


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

No I'm not worried about the vbs - its the worksheet copy

I guess I use _ExcelReadSheetToArray from the source sheet and then _ExcelWriteSheetFromArray to destination sheet?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

If you look at the updated Excel UDF (link below), there is a function for copying or moving a sheet both within the same workbook and to another - _Excel_SheetCopyMove.

'?do=embed' frameborder='0' data-embedContent>>

Edited by JLogan3o13

When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

The latest beta version of AutoIt has the most ucrrent version of this rewritten Excel UDF.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-02-03 - Version 1.4.7.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0