Excel macro code disappeared


P

Poshi

Hi!

Yesterday I created a Macro in Excel 2007 that consists of 1 user form and 5
modules. I used a million times, but today, when I open the xlsm file all the
code in the modules was gone! The user form is there, but everything else
just disappeared!

Can some help me please? I'm desperate!!!!

Thanx!
 
Ad

Advertisements

S

ShaneDevenshire

Hi,

Can't say for sure. But did you save the file? When you are on the VBA
side you have to be careful which file Excel is actually saving - for
example, you may be in the code area for Workbook1, but in the Project window
you are on Workbook2, when you click Save, which file gets saved? You can
tell by placing your mouse over the Save button and viewing the ToolTip.

Maybe the code is there but your looking in the wrong place? Userform code
is not stored in a regular module, it is the userforms module. Double-click
the user form and see if you find anything.

Is it possible you have more than one copy of the file? With code in one
and not the other?

Of course if its gone, there isn't anything one can do except recreate it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top