Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Premium Solver Macro Problem

Hi all...
I have a problem when i record macro using premium solver.
I have an input sheet where the user enters the data and clicks the
solve button. the premium solver solves the optimisation problem and
displays the result.

when i tried to record the macro for the click operation. excel
crashes....
I have added both the solver and premium solver references.. My code
looks like this when i record...

Code:
Sub solve()
'
Sheets("DataInput-Results").Select
' solve Macro
'

Sheets("Model").Activate

Dim prob As New Problem
prob.Init ActiveSheet
prob.Solver.Optimize
Set prob = Nothing

Sheets("DataInput-Results").Activate
End Sub

Please help me find the solution for this problem.

Thanks
Suji
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Premium Solver Macro Problem

Hi Dana...
I did try that part. But its not working still whenever i add the
premium solver reference and then run the macro.Excel Crashes......

any idea what my problem is?

Suji
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Premium Solver Macro Problem

Hi. Sorry it didn't work. I don't know what to suggest at this point.


prob.Init ActiveSheet


I'm sure this is not the problem, but the documentation used the following idea.
Perhaps try that. (They should be the same thing... but you never know)

Sheets("Model").Activate
Dim prob As New Problem
prob.Init Worksheets("Model")


Are you able to run the code without selecting the worksheet "DataInput-Results" first?

Sheets("DataInput-Results").Select
' solve Macro ' <-- Not sure what you are doing here ??

--
Dana DeLouis


"Suji" wrote in message ...

Hi Dana...
I did try that part. But its not working still whenever i add the
premium solver reference and then run the macro.Excel Crashes......

any idea what my problem is?

Suji
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Premium Solver Macro Problem

Hi Dana,
I tried what you suggested putting model in the init thing. I also
removed the other sheet and used only model.activate command.
Evne then it is crashing..
This is totally strange. I have mailed the people who built it.
explaining the problem.
Waiting for their response.

Thanks for your suggestions even though it didnt workout. I appreciate
your help

Suji
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
Substitute for Premium Solver? Plooimankh Excel Discussion (Misc queries) 0 August 31st 09 09:12 PM
premium solver education wonka Excel Discussion (Misc queries) 2 May 4th 09 03:51 AM
Premium Solver does not work with Vista OT Excel Worksheet Functions 2 October 11th 08 11:42 PM
Binary integer non-linear programming excel solver premium Gary[_3_] Excel Worksheet Functions 3 September 14th 08 07:58 AM
Binary integer non-linear programming excel solver premium Gary[_3_] Excel Worksheet Functions 0 September 10th 08 06:46 PM


All times are GMT +1. The time now is 11:26 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"