VBE not showing existing code

After years of programming in most of the Microsoft Office suite applications, this morning I was hit by an anomaly.

The VBE will not show the code, any existing code. I can write code but once saved and reopened it all vanishes. This happens with all Office files (Word, Excel, Access etc.). The modules appear the the VBE tree, but when opening one, the VBE remains blank as if a module was never opened. The code however does exist as it runs as expected and when a module is exported the bas file contains all the code. Yet for some reason the code is not shown in the VBE.

On other computers everything works, so the problem is not with the files but rather with the computer\ Office installation. Rebooted Windows, re-installed Office, yet problem persists.

Searching online it seems that a handful of users experienced the same issue but I couldn't find a solution.

Ideas are welcome and your help is greatly appreciated.


EDIT: If I search for a function only that function will be shown.
LVL 28
MacroShadowAsked:
Who is Participating?

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

x
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.

Zaheer IqbalTechnical Assurance & ImplementationCommented:
Have you had any updates on the machine ?
What happens if you run VB application in compatible mode to use a lower version of Windows ?
0
sarabandeCommented:
you might get this if text and background color are equal. you should see that by using 'End' key of your key board on some lines. if so, check if you were able to change either background color or text color.

Sara
0
MacroShadowAuthor Commented:
Thanks sarabande, but this doesn't help Option Explicit does show on the top then I can go down 2 lines but that's it. Changed both the foreground and the background, same problem.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Gustav BrockCIOCommented:
I would run a reinstall to clean up this unusual state of the installation.
0
MacroShadowAuthor Commented:
Thanks Gustav, but as mentioned in the question, uninstalling and reinstalling didn't help. I uninstalled using Microsoft's Removal Tool.
0
Zaheer IqbalTechnical Assurance & ImplementationCommented:
have you tried compatibility mode ?
0
MacroShadowAuthor Commented:
Thank you Zaheer, no new updates were installed that I know of, everything worked fine last night.
I'm not sure where you're going with the compatibility issue, I'm dealing with Microsoft Office.
0
MacroShadowAuthor Commented:
Zaheer what should I run in compatibility mode?
0
Zaheer IqbalTechnical Assurance & ImplementationCommented:
VBE application on the shortcut change the compatibility mode options to say Windows XP
0
MacroShadowAuthor Commented:
Shortcut to VBE?! What is that?
0
mbizupCommented:
Is this happening with ALL files containing VBA, or is it limited to files in specific folders, etc?
0
mbizupCommented:
Also, what versions of Office/Windows are you running on the problematic computer?
0
MacroShadowAuthor Commented:
mbizup It happens with all files that contain VBA.
The computer in question is running Windows 10 64 bit and Office 2016 Pro Plus 32 bit.
0
mbizupCommented:
Have you verified that none of the other windows (such as the Immediate or Watch windows) were inadvertently resized in a way that obscures the code window?

Can you post a screen shot of the full editor window?
0
MacroShadowAuthor Commented:
VBE ScreenShot
0
MacroShadowAuthor Commented:
Playing with this setting seems to have fixed the problem:
VBE > Tools > Options > Default to Full Module View
1

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
mbizupCommented:
Glad you've got it resolved - what an obscure issue!
0
MacroShadowAuthor Commented:
Thanks guys :)
0
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
Programming

From novice to tech pro — start learning today.