A gray rectangle appeared while I was editing when I pressed something I wasn't supposed to. Is anyone familiar with resetting the Excel VBA view or getting rid of this rectangle?

I'm working on a Mac.


This occurred again when I did View -> Local Window.

enter image description here

  • 1
    I have never seen this in many years of VBA development using all sorts of hosts. I have never used VBA on a Mac. I'm afraid the bad news is that there are many things about MSOffice and VBA that don't work so well on a Mac. Try reinstalling or using office for Windows. You can use bootcamp or a VM to run Windows applications on a Mac.
    – HackSlash
    Mar 22, 2021 at 20:33
  • 2
    Have you tried opening one of the script modules. It doesn't appear you have anything open.
    – Ramhound
    Mar 22, 2021 at 20:37
  • 1
    The dark gray rectangle looks like they could be a redraw artifact of the toolbars. Did you accidentally resize the toolbar panel (I don't know how it behaves on a Mac)? Does it stick if you minimize, resize, or move the window? The light (larger) gray rectangle would be the editor's empty client area, indicating no module is currently opened. Mar 22, 2021 at 21:00
  • I think it may have been a redraw artifact like @MathieuGuindon said. Somehow my reopening and closing didn't work but a nice crash by Excel later on fixed it.
    – Jack
    Mar 22, 2021 at 21:56
  • I'm curious –– is Excel Mac VBA known to be super buggy or is it just the Apple Architecture being difficult?
    – Jack
    Mar 22, 2021 at 21:58

2 Answers 2


I had the same problem. Half my work area was covered by the dark grey box. I tried to modify the toolbar, but VBA for Mac has no way to edit toolbars. After resigning myself to losing half my work space, I resized the editor larger, so I could see more of my code. Hahahaha, the resizing removed the dark grey area.


In this pane:

enter image description here

... you have a couple Modules.
Double-click on an entry below it, that you have access to,
or create a new entry (right click on "Modules).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .