Avatar of Joe Howard
Joe HowardFlag for United States of America

asked on 

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.
ProgrammingMicrosoft OfficeMicrosoft AccessMicrosoft ExcelMicrosoft Word

Avatar of undefined
Last Comment
Joe Howard
Avatar of Zaheer Iqbal
Zaheer Iqbal
Flag of United Kingdom of Great Britain and Northern Ireland image

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 ?
Avatar of sarabande
sarabande
Flag of Luxembourg image

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
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

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.
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

I would run a reinstall to clean up this unusual state of the installation.
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

Thanks Gustav, but as mentioned in the question, uninstalling and reinstalling didn't help. I uninstalled using Microsoft's Removal Tool.
Avatar of Zaheer Iqbal
Zaheer Iqbal
Flag of United Kingdom of Great Britain and Northern Ireland image

have you tried compatibility mode ?
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

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.
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

Zaheer what should I run in compatibility mode?
Avatar of Zaheer Iqbal
Zaheer Iqbal
Flag of United Kingdom of Great Britain and Northern Ireland image

VBE application on the shortcut change the compatibility mode options to say Windows XP
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

Shortcut to VBE?! What is that?
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Is this happening with ALL files containing VBA, or is it limited to files in specific folders, etc?
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Also, what versions of Office/Windows are you running on the problematic computer?
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

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.
Avatar of mbizup
mbizup
Flag of Kazakhstan image

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?
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Glad you've got it resolved - what an obscure issue!
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

ASKER

Thanks guys :)
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo