Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suspect my VBA may have a corrupted file somewhere. How to reinstall?

Status
Not open for further replies.

MPastor

Programmer
Apr 10, 2004
4
US
I've been having some flakely situations when opening Excel workbooks that contain very basic VBA code (1 UserForm, 2 ComboBoxes, 2 ListBoxes and a CommandButton).

I removed and reinstalled my full Windows Office XP/2002 which did not clean up my unreliable VBA/VBE environment...I don't think it was touched by the uninstall/reinstall. I'm running on Windows 2000 Professional.

Rather than spend any more time trying to diagnose and troubleshoot this, I'd like to simply remove/reinstall VBA and all it's pieces parts.

Can you help me by pointing my in the right direction???

In advance, THANK YOU for any and all suggestions.

...Mike
 
look in help for the word "repair". I had this recently, did a repair and it changed a lot but nothing that I wanted.

The diagnosis was the old chestnut of changing the properties of control boxes (eg ComboBox) from another Sub which fired a change event which fired worksheet change event which fired another and another and back to the original change event.

Which fired................ got the idea yet? the stack filled and Excel crashed.

Solution is to set up a global flag TRUE and have the change events exit if true. At the end of the offending routine set the flag to false.

All very obvious once you spot it and you may have to make the mistake twice to remember.
I did.
 
Cresby, Thanks for the suggestion. I was able to find where VBA resides. I found it in the C:\Program Files\Common Files\Microsoft Shared\VBA folder. I renamed it by simply changing the folder's name to ZZZ_VBA.

I then ran SETUP.EXE from my Office XP Professional install CD, used the Add or Remove Features (on the Maintenance Mode Options), and found Visual Basic for Applications in the Office Shared Features option. After selecting the UPDATE button, it installed successfully.

Now, I'm not sure if there are patches, fixes, security updates etc. for VBA that I need to "catch up". Since I've already apply SP3 to my Office XP, I don't think it will let me apply it again.

At least for now, my blatent problems are fixed and I can "use" VBA again.

...Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top