Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copying worksheet from hidden instance of Excel

Is it possible to open multiple worksheets in a hidden instance of
Excel and copy worksheets to a workbook in the original visible
instance? I want to open multiple files and would prefer to not see
all the files being opened in the windows task bar?

wb was opened in a hidden instance of excel. An error occurs at the
ws.copy line.

The error is: "Method 'Copy' of object '_Worksheet' failed"

Is there another option avoid seeing the files being opened in the
task bar?

application.screenupdating = false

Set wb1 = ActiveWorkbook

Set wb = xlApp.Workbooks.Open(fs.FoundFiles.Item(i))

For Each ws In wb.Worksheets
ws.Copy befo=wb1.Sheets(wb1.Sheets.Count)
Next ws

application.screenupdating = true

I am using XP sp3 with Excel 2003

I have it working by inserting worksheets and copying the usedrange.
I would prefer to copy the whole worksheet.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Copying worksheet from hidden instance of Excel

you cannot do this this way. you should open workbooks in first instance of
excel and copy sheets between workbooks. no reason to use a second instance
of excel even if this did work.


"CG" wrote in message
...
| Is it possible to open multiple worksheets in a hidden instance of
| Excel and copy worksheets to a workbook in the original visible
| instance? I want to open multiple files and would prefer to not see
| all the files being opened in the windows task bar?
|
| wb was opened in a hidden instance of excel. An error occurs at the
| ws.copy line.
|
| The error is: "Method 'Copy' of object '_Worksheet' failed"
|
| Is there another option avoid seeing the files being opened in the
| task bar?
|
| application.screenupdating = false
|
| Set wb1 = ActiveWorkbook
|
| Set wb = xlApp.Workbooks.Open(fs.FoundFiles.Item(i))
|
| For Each ws In wb.Worksheets
| ws.Copy befo=wb1.Sheets(wb1.Sheets.Count)
| Next ws
|
| application.screenupdating = true
|
| I am using XP sp3 with Excel 2003
|
| I have it working by inserting worksheets and copying the usedrange.
| I would prefer to copy the whole worksheet.

Reply
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
Copying a sheet from another Excel instance? Gustaf Excel Programming 1 June 18th 09 03:11 PM
How to unhide hidden Excel Instance Missing Excel Debug Excel Programming 2 May 13th 09 10:58 PM
Problem copying from a hidden worksheet (data is copied, but alsoadditional sheet info) Dave Peterson Excel Programming 3 January 31st 08 06:26 PM
Hidden Columns No Longer Hidden after Copying Worksheet? EV Nelson Excel Discussion (Misc queries) 1 December 6th 06 05:10 PM
copying from another instance of excel Paul Excel Programming 7 December 31st 04 12:01 AM


All times are GMT +1. The time now is 10:24 PM.

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

About Us

"It's about Microsoft Excel"