Excel: select cell without scrolling

What Vba would I use to select a cell on a worksheet without scrolling the screen

E.g., I have the following code: activesheet.cells(1,1).select. If I am on row 2000 running this code would skip my screen to the top. What vba would i need tod select cell "A1" without skipping to the top?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ouestqueAuthor Commented:
Thank you whark, nonetheless If I move to row 10000 and run that code in the immediate window, the screen will skip to the top. I would like my screen to stay focused on row 10000 even though code selected cell "a1".
You almost certainly don't need to select the cell and then you won't have the problem. What are you trying to do?
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

application.screenupdating = false


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:

If you use Select, regardless of whether you use activesheet.cells(1,1).select or activesheet.range("A1").select ( as suggested above),  the cell will be highlighted and the selection will shift to that cell.

In many cases, you don't need to actually "select" the cell to manipulate it.

"Select" is not required.

What do you want to do with the cell? It can be done without selecting it.

To change the font color, for example, you could use Select like

    With Selection.Font
        .Color = -16776961
        .TintAndShade = 0
    End With

Open in new window

But you can change the font color without selecting if you use

    With Range("A1").Font
        .Color = -16776961
        .TintAndShade = 0
    End With

Open in new window

The same outcome, but without selecting and shifting the focus of the sheet.

cheers, teylyn
Saqib Husain, SyedEngineerCommented:
Maybe this will work

Sub a()
Dim sr As Long, sc As Long
sr = ActiveWindow.ScrollRow
sc = ActiveWindow.ScrollColumn
ActiveWindow.ScrollRow = sr
ActiveWindow.ScrollColumn = sc
End Sub
ssaqibh - very neat.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.