Jump to content
Sign in to follow this  
joeloyzaga

copy all worksheets from workbook A to B

Recommended Posts

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

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

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

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 2019-07-31 - Version 1.4.12.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
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  

×
×
  • Create New...