Workbook Closes But I can Still See It

Parra

Well-known Member
Joined
Feb 21, 2002
Messages
752
I have a macro and towards the end, it closes the active workbook and the macro continues to work on the 2nd open workbook. Everything is fine with the macro, but when it closes the 1st active workbook, its closed but it remains on the screen.

Any suggestions on how to get off the screen so I can see the macro continue on the 2nd workbook.

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Mudface

MrExcel MVP
Joined
Feb 18, 2002
Messages
3,339
I'm probably barking up the wrong tree, but do you have Application.Screenupdating set to False during your macro? If so, you might need to set it back to True after you close the first workbook.
 

gwkenny

Well-known Member
Joined
Aug 13, 2002
Messages
565
This is really where I get upset with Microsoft.

Microsoft Word's application object has the Application.ScreenRefresh method. Excel does not. My brief searching hasn't found an equivalent either.

This may sound stupid but how about trying activewindow.activate

Or trying turning off screen updating and then turning it back on.

g-
 

Parra

Well-known Member
Joined
Feb 21, 2002
Messages
752
Well ActiveWindow.Activate works and it does not.

It works if it is the last part of the macro.

But if I have the macro continue it does not.
 

Forum statistics

Threads
1,144,741
Messages
5,726,010
Members
422,652
Latest member
Elnene1

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
Top