Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Accessing the Solver Add-in in VBA

Q. I'm trying to run the Solver in Excel via a macro. But as soon as my
code calls a Solver function, I get the message "Sub or Function not
defined". What am I doing wrong?

I found the website www.solver.com which had the following answer in the
FAQ page http://www.solver.com/suppfaqhint.htm

A. You need a reference to the Solver add-in in VBA. First make sure that
you've displayed the Solver Parameters dialog at least once in your Excel
session. Then open the Visual Basic Editor (Alt-F11), select Tools
References, and check the box next to Solver.

That question answers my problem exactly. It does work. The problem is
that I have to do this every time I start a new Excel session. So I'm
looking for a way to set it up so they don't have to do it every time. Any
ideas how to fix it? Would changing the set up in Excel help?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Accessing the Solver Add-in in VBA

I've outlined some alternate approaches on my web site:

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

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


"BigHairyUglyGuy" wrote in
message ...
Q. I'm trying to run the Solver in Excel via a macro. But as soon as my
code calls a Solver function, I get the message "Sub or Function not
defined". What am I doing wrong?

I found the website www.solver.com which had the following answer in the
FAQ page http://www.solver.com/suppfaqhint.htm

A. You need a reference to the Solver add-in in VBA. First make sure
that
you've displayed the Solver Parameters dialog at least once in your Excel
session. Then open the Visual Basic Editor (Alt-F11), select Tools
References, and check the box next to Solver.

That question answers my problem exactly. It does work. The problem is
that I have to do this every time I start a new Excel session. So I'm
looking for a way to set it up so they don't have to do it every time.
Any
ideas how to fix it? Would changing the set up in Excel help?



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
Accessing Macros opieandy Excel Discussion (Misc queries) 9 May 23rd 07 10:55 PM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
Accessing Excel pages using VB bob_mhc Excel Discussion (Misc queries) 1 July 16th 05 10:28 PM
Accessing a Function Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 4 January 1st 05 05:46 AM
accessing worksheets greg Excel Worksheet Functions 2 November 2nd 04 03:53 PM


All times are GMT +1. The time now is 09:51 PM.

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

About Us

"It's about Microsoft Excel"