Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

BackgroundWorker and Excel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NewToVB - 24 Sep 2007 13:44 GMT
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??
Keithlo - 24 Sep 2007 16:16 GMT
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

> 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
[quoted text clipped - 5 lines]
> BackgroundWorker to solve this problem by having my program to run on a
> different thread?  If so how do I do this??
NewToVB - 24 Sep 2007 20:08 GMT
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.  :(  

> 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
[quoted text clipped - 15 lines]
> > BackgroundWorker to solve this problem by having my program to run on a
> > different thread?  If so how do I do this??
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.