matt
matt

Reputation: 1

Can't scroll when opening excel

I have a blank document with some macros that is used to create other documents. However, when I open the blank one, I cannot scroll up or down the screen unless I click out of Excel and click back in, or double click into a cell and then exit it.

I have tried application.enableevents=True, application.screenupdating=True, application.enableanimations=True, but none of them seem to work. Any ideas on how to fix it?

When I saved the document as a standard .xlsx, the issue still was there. Couldn't scroll unless i selected a different window and came back to Excel, or double clicked into a cell.

The scroll bars are still there and they work, but not the scroll wheel. The wheel works in other Excel documents, just not this one.

Here is the document to see if you can figure it out (It is not a good idea to share files with active connections in them). Try to make a video of the problem or to describe it better.

Upvotes: 0

Views: 761

Answers (3)

farzad
farzad

Reputation: 1

I had the same problem, I just maximized the window that contains the code and this fixed the problem

Upvotes: 0

Vityata
Vityata

Reputation: 43585

In general, the scroll area could be set to something without using macros. The simplest solution is to go to the properties of the VB Editor and to delete whatever stays at the ScrollArea place (see the white arrow):

enter image description here

If it is not this, then feel free to run this:

Sub TestMe
    With ActiveWindow 
        .DisplayHorizontalScrollBar = True 
        .DisplayVerticalScrollBar = True 
    End With 
End Sub

Upvotes: 0

Mario Apra
Mario Apra

Reputation: 93

You can 'force' the scroll area to be all the sheet.

Sub fix_scroll_area()
    ThisWorkbook.ActiveSheet.ScrollArea = ""
End Sub

Upvotes: 1

Related Questions