Stop Excel from Opening Multiple Windows using VBA

TMabry

New Member
Joined
Jul 14, 2016
Messages
2
I am totally befuddled by this issue and have been searching for a solution non-stop for two days. Here is my issue. For some reason beginning this week, my VBA code for pulling down a daily Excel File from a Website started opening the Excel File in a separate excel process instead of using the already open process. This is causing the code to break because after opening the downloaded file, my code calls to close that newly downloaded file and proceed to the next steps. Beginning this week and for any reason I cannot find, the separate process is invisible by my VBA code, and hence it close the Macro instead of the newly opened file! I can stop the code at the exact time it occurs and the file *IS* open, but invisible on my Task Bar and apparently to my VBA Macro File.

I am using Excel 2010. The macro is written and saved as a *.xlsb file. The File format I am downloading from the Website I am hitting is *.xls File.

The process is as follows:

1. Using MS Scheduler, I call the Macro File
2. It Auto-Starts the Macro
3. It locates from MS Outlook the Email that contains the Link to the Website
4. It captures the link, then launches Chrome Browser Window
5. The file is downloaded to my C:\Downloads Folder
So-far works perfectly
6. It saves the open file to a different file name, but here is where it wigs out. Normally when you save a file from one Excel File to a Different File Name it closes the original File Name and creates the new file. But in my case (using VBA code) instead of closing it, it remains open.
7. When I go to close the Excel File that should be Active in my VBA Code, it closes the Macro File instead.

Sorry for the length, but need to be detailed, because this problem cannot be fixed apparently by simply turning DDE off / on. Registry Fix Failed. Open in same Window is checked, and failed.

Hope someone can shed light on the problem. Thanks!!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,215,497
Messages
6,125,157
Members
449,208
Latest member
emmac

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top