S
smileclick
I'm trying to import worksheets from a spreadsheet file into an the running
XLA Add-In (the XLA holding the code for importing the spreadsheets).
I tried using:
Sheets(Array("Sheet1","Sheet2")).Copy After:=ThisWorkbook.Sheets(1)
But got a "Run-time error '1004': Copy Method of Worksheet Class failed" error
I tried using:
Sheets.Add Type:=Source_File_Name, before:=ThisWorkbook.Sheets(1)
But it will only add the sheets to the Active Workbook, not the XLA Workbook
(if there is no open workbook I get a "Method 'Sheets' of object '_Global'
failed" error).
XLA Add-In (the XLA holding the code for importing the spreadsheets).
I tried using:
Sheets(Array("Sheet1","Sheet2")).Copy After:=ThisWorkbook.Sheets(1)
But got a "Run-time error '1004': Copy Method of Worksheet Class failed" error
I tried using:
Sheets.Add Type:=Source_File_Name, before:=ThisWorkbook.Sheets(1)
But it will only add the sheets to the Active Workbook, not the XLA Workbook
(if there is no open workbook I get a "Method 'Sheets' of object '_Global'
failed" error).