Disable Scrolling while Macro is Running

AK_Excel_13

New Member
Joined
Jul 11, 2014
Messages
30
How do I disable scrolling while my macro is running? I want my screen/window to be locked when the macro starts and unlocked when the macro ends.

However, I do not want to disable ScreenUpdating.

Application.ScreenUpdating = False
Set x = ActiveCell
***macro***
x.Select
Application.ScreenUpdating = True

Thanks!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Is the macro recorded? Does the macro cause the scrolling?
 
Upvote 0
I would rather not post the code because it has sensitive information on it. Sorry.

The macro selects other cells which causes the scrolling. I would like the macro to stop all scrolling or lock the screen while the screen is updating.
If I get rid of all the selecting that the macro does then maybe I can stop the scrolling.
 
Upvote 0
That makes it difficult, if we can't see the code !!
As a suggestion any lines that end with .Select, followed by a line that has .Selection at the beginning can be modified and joined like this
Code:
Range("A1").Select
Selection.copy


CAN BECOME

Range("A1").copy
 
Upvote 0

Forum statistics

Threads
1,215,982
Messages
6,128,105
Members
449,421
Latest member
AussieHobbo

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