LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do you import sheets into an Excel XLA Add-In?

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, befo=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).
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import data from a particular cell in different excel sheets Sri Harsha[_2_] Excel Discussion (Misc queries) 1 September 8th 09 01:03 PM
Import Txt file over several excel sheets Tamara Excel Discussion (Misc queries) 2 December 2nd 08 10:51 PM
Import table into Excel with lines sliced into separate sheets by UID Max Excel Programming 1 November 22nd 06 12:52 AM
import and search datas from different Excel Sheets Franz Muster Excel Programming 1 February 9th 06 05:19 PM
Import to excel Access database directly to a variable (not using sheets) internacio Excel Programming 2 January 30th 06 02:03 PM


All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"