Problems Opening Workbook after running macro

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

I have a 12.9MB workbook that opens and works fine and
fast. Then I everytime I run a macro and then save my
workbook it will never open back up. When I go to open it
I double click it as ussual and it just says opening and
freezes up.

I dont know what to do here. I ran the macro just now and
then went back in the workbook and worksheets code and
there are no open procedures. If anyone wants I can send
them a copy of my macro I am running. I will also post it
if you request. Its rather long. I will also send a copy
of my workbook if needed. I just really need to know
whats going on here.


Thank you.
 
normally i wouldn't ask, but what version of excel and operating syste
are you using? in this case it makes quite a difference.

typically excel saves somewhere like 9 to 10 levels of corrections an
replacements for it's "undo" properties. this can cause file bloat i
workbooks with huge macros.

the next time you can open your book, you should copy the sheets to
new workbook, open the vbe and cut and paste all your code (assumin
there are no userforms or sheet specific code) into a new module.

save this, and your new book will be much trimmer, no bloat.

another thing, do you use commands that use END(xlToRight) .End(xlDown
to find the last cell in the workbook and then move xlUP to find th
last used cell? If so, and you use excel 95 or 97, then excel could b
storing the last accessed address in a "Cell table" as part of the las
"Used range"

you can tack a little proc onto the end of your giant macro to forc
Excel to readdress the used range

'begin code

Sub URResetCellTable()

sht = ActiveSheet.Name

Worksheets(sht).UsedRange
Set oRng = Worksheets(sht).UsedRange

End Sub

'end cod
 

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

Back
Top