Excel Macro runs fine..then excel crashes

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

windpowerfinance

Thread Starter
Joined
Jan 24, 2010
Messages
8
Hi, I have created an excel macro that runs sensitivities in my model. The excel button runs 5 different cases.

The macro runs fine and does as I want it to.

Once the macro has run, and I go to edit a cell and hit "F2" excel crashes. This only seems to happen in certain cells and not all of the time.

Does anyone have experience with similar questions?

Thanks
 
Joined
Jan 25, 2010
Messages
35
I have never encountered this problem.
Suggestions:
1) before hitting the F2 key, try saving the spreadsheet to see if that still works
2) break the macro into 5 different small macros that do each case--see if only 1 causes the crash
3) try the same spreadsheet and macros on a DIFFERENT computer. If you have faulty memory in your computer, that only gets used when you employ the macro then it should show it
4) save another copy of spreadsheet for trial purposes--delete as much data as you can, in increments, to see if there is a point where Excel does not crash
5) make sure that you have all the updates for Excel from MS and that you OS is updated with all patches
If you want I could try the macros on my PC. You could take out all propriety info.
 

windpowerfinance

Thread Starter
Joined
Jan 24, 2010
Messages
8
Hi, I was able to figure out that it is the indiviudal MACRO that runs solver. The code is below. Do you see any Errors? I have tried it on different computers and it still crashes. I will try some of your other fixes.

Thanks so much for the help!
Code:
Sub solvePPA()
'
' solvePPA Macro
'
 
'   SolverReset
    SolverOk SetCell:="$AH$4", MaxMinVal:=3, ValueOf:="0", ByChange:="$M$8"
    SolverSolve userFinish:=True
End Sub
Sub NCF()
 

windpowerfinance

Thread Starter
Joined
Jan 24, 2010
Messages
8
So I tried what you suggested.

-On a different computer with XP not Vista, Still crashes

-Tried saving the file after running the Macro, it crashes if it is saved with the same name, if you save as a new name it does not crash until you run the Macro again.

- I tried waiting for 5 min after running the Macro, still crashes.

- I tried writing a new solver Macro in the work book, something simple like make 1+ a number = 2. This worked fine. When I deleted my the Solver Macro giving me problems and re reordered it still crashes.

Any suggestions are welcome! Thanks again for your help!
 

windpowerfinance

Thread Starter
Joined
Jan 24, 2010
Messages
8
Further analysis has found out that it is not a Macro problem at all. It is whenever I run solver to solve for a particular cell by changing another specific cell.

I do not understand why the solver works perfectly, but then when you hit "F2" the file crashes.

It does this on any computer as well.

I am extremely thankful for any thoughts or suggestions.
 
Joined
Oct 20, 2004
Messages
7,837
brent at brentjones dot org
Brent - it is the practice here never to actually write out your email unless you do so in a form like how I have altered yours here, for there are many, many bots out there trolling for email addresses.
Please go back and edit your post to fix this.
 
Joined
Jan 25, 2010
Messages
35
Have you tried using the solver on another similar problem? Try using cell references that are different too.
 

windpowerfinance

Thread Starter
Joined
Jan 24, 2010
Messages
8
Yes I tired uninstalling and reinstalling the Solver program. I am at a loss. The model is not that complicated and only makes up 500 rows of calcs. I have to imagine excel 2007 is set up to handle much more complicated things.

This is real frustrating as I am trying to build a sensitivity box that folks in the company can just click a button and have it run a few different cases.

Is there another way to "solve" aside from using solver? Goal seek does not get the numbers exact but I guess I could use it if there is no other way!
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top