+ Reply to Thread
Results 1 to 5 of 5

Using VBA to Open Another Workbook in the Background

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Toronto, ON
    MS-Off Ver
    MS Office 2010
    Posts
    55

    Using VBA to Open Another Workbook in the Background

    Hi. Trying to find out if the following is possible with VBA: I am in one Excel workbook ("MasterFile.xlsm") and I want to attach vba code to a button that will open another workbook ("Region.xlsm"), print a worksheet in the "Region.xlsm" file, Save and Close that file. I have been able to accomplish this but, I don't want the "Region" file to be visible on screen while this it is running. In other words, can it do all of this in the background of the "MasterFile" or can it be minimized? I am currently using the following code:
    Please Login or Register  to view this content.
    This works but since the "Region" file is large, it takes time to open and starts displaying partial data on the "MasterFile" while it is working. I'd rather it take it's time to open and close without the user knowing what is going on. Perhaps a Message box could appear saying that the report is generating and not to touch any keys. Thanks.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using VBA to Open Another Workbook in the Background

    Turn off ScreenUpdating and what you're doing won't be seen.

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Toronto, ON
    MS-Off Ver
    MS Office 2010
    Posts
    55

    Re: Using VBA to Open Another Workbook in the Background

    Thank you J! I will try this now. I appreciate it!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using VBA to Open Another Workbook in the Background

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  5. #5
    Registered User
    Join Date
    07-21-2014
    Location
    Toronto, ON
    MS-Off Ver
    MS Office 2010
    Posts
    55

    Re: Using VBA to Open Another Workbook in the Background

    I just tried it and yes it does solve it so I will close it. Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. open excel source document in background when i open word document
    By hootiebsc in forum Word Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2013, 07:50 PM
  2. Macro to open a closed workbook and select copy cells into an open workbook
    By helloganesh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2013, 02:00 PM
  3. Save an open workbook, then open template workbook and close the saved workbook
    By ondvirg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2009, 10:20 PM
  4. Open a workbook in the background (like filestream)
    By TommySzalapski in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2005, 11:05 AM
  5. How to open file in the background. It is possible?
    By Andrzej in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-31-2005, 06:05 PM

Tags for this Thread

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