How do I keep Excel from "Blinking" during programmatic worksheet addition

steverspr

New Member
Joined
Jun 23, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a VBA application that launches another Excel Workbook. When I programmatically add a new worksheet
to the other workbook Excel "blinks" several times. How do I keep the focus on the workbook that launches the code that adds the new worksheet to avoid this "blinking"
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
put application.screenupdating=false at the start of the macro, and change it back application.screenupdating=true at the end. It might be worth including some error handling so that if an error occurs rather than just crashing out it goes to the end of the macro and resets the status of screenupdating. I usually also put application.enableevents=false at the start of a macro and application.enableevents=true at the end - it just stops a lot of code running before you want it to!

HTH
 
Upvote 0
I implemented your suggestion and it appears to have worked. Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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