Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Can I automate the checking of the "Solver" box in VBA References?

Hi,

Is there a way to have code check the "Solver" box VBA? FYI - I currently
need to do this manually using the following steps:

- Go to "Tools - Macros - Visual Basic Editor"
- Go to "Tools - References"
- Check the checkbox next to 'Solver' and click 'OK'

Thanks!


--
Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default Can I automate the checking of the "Solver" box in VBA References?

If you are writing VBA code to use Solver, simply set a reference to it
once in your project (manually, like you are doing now) and you are done.

If you mean that you need to check to see if Solver is installed on another
user's machine before you attempt to make calls to the Solver routines,
then include this line of code somewhere at the top of your code:

AddIns("Solver Add-in").Installed = True

--
Regards,
Bill Renaud


"robs3131" wrote in message
...
Hi,

Is there a way to have code check the "Solver" box VBA? FYI - I

currently
need to do this manually using the following steps:

- Go to "Tools - Macros - Visual Basic Editor"
- Go to "Tools - References"
- Check the checkbox next to 'Solver' and click 'OK'

Thanks!


--
Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Can I automate the checking of the "Solver" box in VBA Referen

Thanks Bill. Yeah, I figured out that once you check the box, it remains
checked for that spreadsheet. For some reason I was under the impression
that checking the box was specific to each computer -- similar to installing
Solver on each machine.

Thanks for your feedback.

--
Robert


"Bill Renaud" wrote:

If you are writing VBA code to use Solver, simply set a reference to it
once in your project (manually, like you are doing now) and you are done.

If you mean that you need to check to see if Solver is installed on another
user's machine before you attempt to make calls to the Solver routines,
then include this line of code somewhere at the top of your code:

AddIns("Solver Add-in").Installed = True

--
Regards,
Bill Renaud


"robs3131" wrote in message
...
Hi,

Is there a way to have code check the "Solver" box VBA? FYI - I

currently
need to do this manually using the following steps:

- Go to "Tools - Macros - Visual Basic Editor"
- Go to "Tools - References"
- Check the checkbox next to 'Solver' and click 'OK'

Thanks!


--
Robert




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Can I automate the checking of the "Solver" box in VBA Referen

You may run into problems if the version of Excel, or the Office
installation directory, is different on the computers using the workbook. I
spent weeks trying to get the referencing to work out in this situation,
which was made more difficult by the security of later Office versions.
Finally I resorted to using Application.Run to call Solver, as I describe
he

http://peltiertech.com/Excel/SolverVBA.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"robs3131" wrote in message
...
Thanks Bill. Yeah, I figured out that once you check the box, it remains
checked for that spreadsheet. For some reason I was under the impression
that checking the box was specific to each computer -- similar to
installing
Solver on each machine.

Thanks for your feedback.

--
Robert


"Bill Renaud" wrote:

If you are writing VBA code to use Solver, simply set a reference to it
once in your project (manually, like you are doing now) and you are done.

If you mean that you need to check to see if Solver is installed on
another
user's machine before you attempt to make calls to the Solver routines,
then include this line of code somewhere at the top of your code:

AddIns("Solver Add-in").Installed = True

--
Regards,
Bill Renaud


"robs3131" wrote in message
...
Hi,

Is there a way to have code check the "Solver" box VBA? FYI - I

currently
need to do this manually using the following steps:

- Go to "Tools - Macros - Visual Basic Editor"
- Go to "Tools - References"
- Check the checkbox next to 'Solver' and click 'OK'

Thanks!


--
Robert






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default Can I automate the checking of the "Solver" box in VBA Referen

Very interesting! I don't understand how your CheckSolver function gets the
Solver installed correctly the 2nd time after temporarily uninstalling it
(and before running the Auto_open macro). Why wouldn't Solver simply go
back to the same state that it had when you checked
Application.AddIns("Solver Add-In").Installed the 1st time?

--
Regards,
Bill Renaud





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Can I automate the checking of the "Solver" box in VBA Referen

Because it doesn't. <g

It probably seems flip, but this protocol was developed through hours of
frustration.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Bill Renaud" wrote in message
...
Very interesting! I don't understand how your CheckSolver function gets
the
Solver installed correctly the 2nd time after temporarily uninstalling it
(and before running the Auto_open macro). Why wouldn't Solver simply go
back to the same state that it had when you checked
Application.AddIns("Solver Add-In").Installed the 1st time?

--
Regards,
Bill Renaud





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Shortcut key for "Paste Options" and "Error Checking" buttons? johndog Excel Discussion (Misc queries) 1 October 6th 06 11:56 AM
cell references increase by 3 per row "=I1" then "=I4" jwk515 Excel Discussion (Misc queries) 3 May 9th 06 02:00 AM
Tools...References shows "MISSING:" in front of 2 references Mike Jamesson Excel Programming 1 October 19th 05 06:33 PM
References.Remove References(1) DOES NOT WORK for "MISSING:" Refs Jamie Carper[_2_] Excel Programming 0 May 27th 04 04:22 PM


All times are GMT +1. The time now is 06:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"