PC Review


Reply
Thread Tools Rate Thread

BackgroundWorker and Excel

 
 
=?Utf-8?B?TmV3VG9WQg==?=
Guest
Posts: n/a
 
      24th Sep 2007
I'm using Visual Studio 2005 and programming with Visual Basic so its very
similar to VBA. I have a process that runs and compares two different
spreadsheets and does a few vlookups and some other tasks. But when I'm
running this program I can't use excel because if I do, it throws my process
off because in several cases my program references the active workbook. When
I'm trying to work with excel manually while my program is running the excel
spreadsheets I've called are no longer the active sheets. Could I used
BackgroundWorker to solve this problem by having my program to run on a
different thread? If so how do I do this??
 
Reply With Quote
 
 
 
 
=?Utf-8?B?S2VpdGhsbw==?=
Guest
Posts: n/a
 
      24th Sep 2007
I don't know about that, but couldn't you open a separate instance of Excel
for the ones you're working on manually, instead of opening your files in the
instance that your program is going to use? And if you're not sure which
instance your program is going to use, couldn't you have your program declare
its own instance of Excel before it starts working?

Hope this helps.

Keith

"NewToVB" wrote:

> I'm using Visual Studio 2005 and programming with Visual Basic so its very
> similar to VBA. I have a process that runs and compares two different
> spreadsheets and does a few vlookups and some other tasks. But when I'm
> running this program I can't use excel because if I do, it throws my process
> off because in several cases my program references the active workbook. When
> I'm trying to work with excel manually while my program is running the excel
> spreadsheets I've called are no longer the active sheets. Could I used
> BackgroundWorker to solve this problem by having my program to run on a
> different thread? If so how do I do this??

 
Reply With Quote
 
=?Utf-8?B?TmV3VG9WQg==?=
Guest
Posts: n/a
 
      24th Sep 2007
Thanks for your response. I have it running in its own instance but when I
go to use excel manually while my program is running (even if I have the
visible property set to false) it throws the program off and it will start
reading data from the excel sheet that I've opened manually.

"Keithlo" wrote:

> I don't know about that, but couldn't you open a separate instance of Excel
> for the ones you're working on manually, instead of opening your files in the
> instance that your program is going to use? And if you're not sure which
> instance your program is going to use, couldn't you have your program declare
> its own instance of Excel before it starts working?
>
> Hope this helps.
>
> Keith
>
> "NewToVB" wrote:
>
> > I'm using Visual Studio 2005 and programming with Visual Basic so its very
> > similar to VBA. I have a process that runs and compares two different
> > spreadsheets and does a few vlookups and some other tasks. But when I'm
> > running this program I can't use excel because if I do, it throws my process
> > off because in several cases my program references the active workbook. When
> > I'm trying to work with excel manually while my program is running the excel
> > spreadsheets I've called are no longer the active sheets. Could I used
> > BackgroundWorker to solve this problem by having my program to run on a
> > different thread? If so how do I do this??

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: BackgroundWorker in Excel 2007 Managed Add-In =?Utf-8?B?WEwtRGVubmlz?= Microsoft Excel Programming 0 26th Oct 2006 10:32 AM
BackgroundWorker elziko Microsoft Dot NET 5 19th May 2006 04:39 PM
Help with BackgroundWorker =?Utf-8?B?U2hhdXJ5YSBBbmFuZA==?= Microsoft Dot NET 0 25th Jan 2006 09:27 PM
BackgroundWorker + CF 2.0 =?Utf-8?B?U2Ft?= Microsoft Dot NET Compact Framework 2 21st Dec 2005 08:52 AM
Using BackgroundWorker Tim Anderson Microsoft C# .NET 3 22nd Nov 2005 07:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:00 AM.