ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   More Solver Problems (https://www.excelbanter.com/excel-programming/302565-more-solver-problems.html)

Frederick Waithe

More Solver Problems
 
I hope anyone can help with this. I've developed a pretty basic
forecasting spreadsheet/app in excel (2000, Windows 2000). I use VBA
code to initiate solver from a form.

Solver seems to work fine when the macro(s) that make use of it are
triggered directly or by a button (on a worksheet) they are assigned
to. But it doesn't seem to be working when the same macros are
triggered by the form. I can see that calculation is taking place
(the screen is blinking), but it's finished much faster than normal
and the solution NEVER changes!

I've tried switching initial conditions across a wide range and I know
the form's code works because the same form is in another workbook and
everything works fine there (the macros are also the same).

I do have custom views assigned to the workbook with the problem and
I've noticed that when I've opened the view that contains the sheet
with the macros (sheet3 in this case) then the form drives the macros
calling solver just fine. The problem is that this sheet is not
useful to the end user(s) and so I've hidden it for that reason.

Any help at all would be great!
Thanks

Tom Ogilvy

More Solver Problems
 
did you try holding everything else constant and running your code first
with the sheet visible and then with the sheet hidden.

That should show if the sheet being hidden is the limitation.

--
Regards,
Tom Ogilvy

"Frederick Waithe" wrote in message
om...
I hope anyone can help with this. I've developed a pretty basic
forecasting spreadsheet/app in excel (2000, Windows 2000). I use VBA
code to initiate solver from a form.

Solver seems to work fine when the macro(s) that make use of it are
triggered directly or by a button (on a worksheet) they are assigned
to. But it doesn't seem to be working when the same macros are
triggered by the form. I can see that calculation is taking place
(the screen is blinking), but it's finished much faster than normal
and the solution NEVER changes!

I've tried switching initial conditions across a wide range and I know
the form's code works because the same form is in another workbook and
everything works fine there (the macros are also the same).

I do have custom views assigned to the workbook with the problem and
I've noticed that when I've opened the view that contains the sheet
with the macros (sheet3 in this case) then the form drives the macros
calling solver just fine. The problem is that this sheet is not
useful to the end user(s) and so I've hidden it for that reason.

Any help at all would be great!
Thanks




Frederick Waithe

More Solver Problems
 
Yes Tom and thanks. I did try that. It does seem to be the hidden
sheet. What I don't understand is why that's the case with this
particular workbook. Any idea on what property(ies) of the sheet I
can turn on (or off) (besides visible) to eliminate the problem?


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com