LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Solver -Macro

Hi,

I have no error, but the macro just doesn't do anything. The solver.xla is
activate and also in vba.

But the thing is, even if I initialize it, it won't do anything. On some
cpu, it work very well. Is there an option I need to activate beside the
solver add in in excel and vba? Here's the code :

Sub macro1()

Dim age As Integer

Worksheets("Calcul - Cotis. fixe").Activate

Application.Run "solver.xla!auto_open"

SolverReset

For i = 1 To 300

age = CInt(Worksheets("Calcul - Cotis. fixe").Cells(i + 5, 3).Value)

If age = 65 Then
SolverOk SetCell:=Worksheets("Calcul - Cotis. fixe").Cells(i + 5,
21), _
ByChange:="$T$1", MaxMinVal:=3, ValueOf:="0.70"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
Exit For
End If

Next i

end sub
 
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
Solver Macro Lacty Excel Programming 0 May 6th 08 10:32 AM
solver macro John Excel Programming 2 October 4th 06 05:25 AM
Macro for Solver Velero Excel Programming 2 February 19th 04 01:39 PM
Solver Macro Dick Stumbo Excel Programming 0 September 18th 03 01:55 AM


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

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"