Excel Frozen - I want my VB code

A

Anthony

Hi
Any know how to get into VB editor when excel programme is frozen. My
worksheet is frozen and I can't get it back - but I want my VB code from it.
Thanks
 
E

Earl Kiosterud

Anthony,

If your code is in a loop, press Ctrl-Break to stop it. Is that what you
mean by "frozen?"
 
A

Anthony

Earl,
maybe not, basically I created a workbook with a personal toolbar and many
macros to carry out various tasks. I can Open the worksheet , but as soon as
I do the mouse cursor changes to the egg times and after a few seconds I get
'Not Responding'. I can't click on anything within the sheet apart from the
'minimise' 'maximise' and 'close'
any suggestions
 
H

Henry

Anthony,

Open a blank workbook.
Go Tools>Options>Security>Macro Security and set it to the middle option.
Close and save the workbook (any name)

Now open your faulty workbook.
When it asks you if you want to run macros, hold the shift key down and
click yes.

Your workbook will open but the macros won't run.
You can then access the VBE and see your code.

HTH
Henry
 
A

Anthony

Henry,
Thanks for help......but......
Did as you suggested, however on pressing the Shift key - nothing happened,
the worksheet opened as normal, hung for a few seconds (egg timer showing)
then came back with 'Not Responding'. The only option left was to close the
excel sheet.
rgds
Anthony
 
G

Gord Dibben

Anthony

Could be your *.XLB file is giving you trouble. This is the file that stores
menu and toolbar customizations and can get corrupt.

Do a search for *.XLB with Excel closed out.

When found, rename it to *.xlbold or similar.

Excel will build a new one with defaults, losing your customizations, but you
can redo them if this suggestion works.

Start Excel and try to open the workbook. If it opens, you can retrieve your
macros.

Good idea to keep your *.XLB file size to a minimum.

Customizations can be created "on the fly" using code to build meus and
toolbars when a workbook opens.


Gord Dibben Excel MVP
 
H

Henry

Anthony,
Did you hold the Shift Key down when you clicked yes to the Run Macros
message box?

Henry
 
E

Earl Kiosterud

Anthony,

Definitely look at the xlb file as Gord suggested. Henry has already ruled
out a runaway Auto_Open or Workbook_Open macro. When things are weird ,
there are a few other things we routinely do. Can't hurt:

Look at "Excel acts generally goofy" at
http://www.smokeylake.com/excel/vfaq.htm. Try those things.

The workbook may be damaged. Depending on your version lf Excel, you may be
able to repair it. File - Open, click the dropdown in the "Open" button and
do "Open and repair." If you don't have that (your version of Excel is too
old), send it to someone with a later version who might be able to do this.

Are the applicable service packs installed for your version of Excel? You
can download them from microsoft.com.

I'm hiding under the table as I say: I hope you have a backup of the file.

Good luck.
 
Top