Help...all my VB code disappeared...

chazrab

Well-known Member
Joined
Oct 21, 2006
Messages
918
Office Version
  1. 365
Platform
  1. Windows
...the only thing I've done different is purchase a new version of AVG(similiar to Norton) last evening and AVG PC Tuneup 2011. I ran a scan, no infections, and that's it. Now I'm scared because all my VB code just disappeared.

In Tools -> References, Visual Basic For Applications and Microsoft 14.0 Object Library are both checked. All the rest of the boxes in the Reference dialog are unchecked.

I could reinstall the entire Microsoft Office 2010 suite from my DVD which I'm tempted to do, but I'm holding off on that until I hear back from one of you on why I can't see the code.

As an example, there is underlying code in a drop down combo box in col A. It is visible in Design Mode but does not appear and drop down when any cell in that column is touched, like the code which is not there directs it to.

I did do a System Restore back to yesterday, 06/30/2011 at 8:46 PM, but that time was AFTER I installed the new AVG license. System Restore will let me go back several days if needed. I just don't see how all of my code and macros could have just disappeared.

Please someone help asap

Thanks, CR
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Do you have your security settings so that macro's are enabled/allowed?
Did you save your workbook in the .xlsm format and not in the .xlsx?

I use AVG too, and as far as I know, it does not remove VBA code from files, although there might be some paranoid setting which does just that, not sure.
 
Upvote 0
Make sure your events aren't disabled. In the Immediate Window in your VBA editor type:
Code:
Application.EnableEvents=True

and see if your dropdown box shows up. If I had to guess, you've got something like:
Code:
Application.EnableEvents = False

at the start of your code and didn't turn it on at the end.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,882
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top