+ Reply to Thread
Results 1 to 5 of 5

Can't open an Excel workbook while vba is running in another

  1. #1
    Registered User
    Join Date
    04-21-2012
    Location
    Greensboro, NC
    MS-Off Ver
    Excel 2007
    Posts
    18

    Can't open an Excel workbook while vba is running in another

    If I have an open workbook running some vba code, it doesn't tie my computer up...I can check my email or copy files or whatever...but I can't open or manipulate another Excel workbook. Is there a way to run vba in Excel without it tying up the ability to open a separate workbook?

  2. #2
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: Can't open an Excel workbook while vba is running in another

    Had a similar experience at my last workplace. Some files that were thrust upon us had VB and totally screwed up the operation of more important work (my w/s!). We never did get a solution other than closing the offender down.
    If I helped, please don't forget to add to my reputation. (click on the star below the post)

    If the problem is solved, please: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.

    Failure is not falling down but refusing to get up.

  3. #3
    Registered User
    Join Date
    04-21-2012
    Location
    Greensboro, NC
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Can't open an Excel workbook while vba is running in another

    Unfortunately, in this case, the "offender" is my own process...I was just hoping there was some way around it...I don't really like not being able to do anything else in Excel while I have an automated process running for an hour.

  4. #4
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Can't open an Excel workbook while vba is running in another

    You can use control + pause break to halt active code - Then open your workbook, then resume your code - Only issue of course though is if your automation requires any active windows, etc, and/or would be impacted (coding wise) by having any other workbooks open. Not to mention, if you're running something that is taking a hour - it is more than likely eating up your excel resources and you would a see performance impact.

    You could also just open another instance of excel using createobject() and just have 2 instances of Excel (I haven't tested that, but with 2 separate instances you should be able to run code in one and then whatever else you want in the other).

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Can't open an Excel workbook while vba is running in another

    Hi dbiggied
    I don't have a solution but I am curious about this
    I have an automated process running for an hour
    What would that be that it takes such a long time?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1