ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Instead of opening Solver Excel starts up a sub from the VBA project (https://www.excelbanter.com/excel-programming/375568-instead-opening-solver-excel-starts-up-sub-vba-project.html)

[email protected]

Instead of opening Solver Excel starts up a sub from the VBA project
 
Hi!

I have VBA code to set up and run Solver in Excel and it runs fine.
There is a weird thing happening though - when I try to run Solver
manually, i.e. through the Excel interface, it does not open but starts
up the one of hte subroutines of my VBA project. It is not a major
problem, but is really annoying and I cannot really run manually the
Sover to check it against the results of my code.

Any comment is appreciated!


Alan

Instead of opening Solver Excel starts up a sub from the VBA project
 
Is the solver add-in enabled?

Check <Tools<Add-Ins and ensure that the Solver check box is ticked.


wrote:
Hi!

I have VBA code to set up and run Solver in Excel and it runs fine.
There is a weird thing happening though - when I try to run Solver
manually, i.e. through the Excel interface, it does not open but starts
up the one of hte subroutines of my VBA project. It is not a major
problem, but is really annoying and I cannot really run manually the
Sover to check it against the results of my code.

Any comment is appreciated!



Danail[_2_]

Instead of opening Solver Excel starts up a sub from the VBA project
 
Yes, the Solver add-in is enabled. I have a procedure that uses it and
it runs fine.


Tushar Mehta

Instead of opening Solver Excel starts up a sub from the VBA project
 
What is the name of the procedure that is started?

Have you modified the default behavior associated with the Solver menu
item?

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2007

In article . com,
says...
Hi!

I have VBA code to set up and run Solver in Excel and it runs fine.
There is a weird thing happening though - when I try to run Solver
manually, i.e. through the Excel interface, it does not open but starts
up the one of hte subroutines of my VBA project. It is not a major
problem, but is really annoying and I cannot really run manually the
Sover to check it against the results of my code.

Any comment is appreciated!



Danail[_2_]

Instead of opening Solver Excel starts up a sub from the VBA project
 
No, I have not modified anything.
The name of the procedure is "Main".


Dana DeLouis

Instead of opening Solver Excel starts up a sub from the VBA project
 
The name of the procedure is "Main".

Don't know, so just throwing this idea out...
Solver has an internal procedure called "Main", and in earlier versions of
Excel caused an undocumented bug. Are you using an earlier version of
Excel?
Try changing you Subroutine to something other than "Main."
Again, just throwing out an idea...
--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"Danail" wrote in message
ps.com...
No, I have not modified anything.
The name of the procedure is "Main".




Danail[_2_]

Instead of opening Solver Excel starts up a sub from the VBA project
 
Hey, Dana!
I changed the name of the procedure and Solver opens properly now.
Thank you for the suggestion. I use Excel 2003, but I guess with Excel,
as other things, bad habbits die hard.

Cheers!


Dana DeLouis

Instead of opening Solver Excel starts up a sub from the VBA project
 
Hi. Thank you very much for the feedback, especially that you are using
Excel 2003.
Glad it helped. :)
A little off topic, but another good habit to get into with Solver is not to
use workbook names that have a space in them. In certain types of Solver
programming, Solver can not internally store the name of the workbook
correctly if it has a space in the name. Why, we'll never know. Just
another undocumented bug...err...I mean feature.
--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"Danail" wrote in message
ups.com...
Hey, Dana!
I changed the name of the procedure and Solver opens properly now.
Thank you for the suggestion. I use Excel 2003, but I guess with Excel,
as other things, bad habbits die hard.

Cheers!





All times are GMT +1. The time now is 09:27 AM.

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