Philippe, Take a look at Paul Jensen's page on OR at: http://www.me.utexas.edu/~jensen/ORMM/ If you click on add-ins, he as an LP/IP solver and he has an add-in that will help you with VBA. Regards, Doug Matheson Allen, Texas ********************************************* [log in to unmask] wrote on 4/19/04 7:13:16 AM ********************************************* Dear Philippe Try to record macro whilst doing your Solver formulation in a blank Excel doc. After completion of the macro recording, you will see the way Excel likes it in its VB editor. Hope this helps Peppy Adi-Purnomo > -----Original Message----- > From: A UK-based worldwide e-mail broadcast system mailing list > [mailto:[log in to unmask]]On Behalf Of Philippe Guiblin > Sent: Monday, 19 April 2004 21:01 > To: [log in to unmask] > Subject: Using the Excel LP solver within VBA code > > > Dear allstaters, > > I am trying to use this command below to add constraints to the solver > within a VBA program which updates an excel spreadsheet. > > For u = 1 To ilength > SolverAdd CellRef:=Chr(imin + u - 1) & (jmax + 2), Relation:=2, > FormulaText:=Chr(imax + 2 + u - 1) & 13 > Next > > My problem is that Excel do not understand the cell reference on the right > handside of the Formula.Text option. There is no error message. The cell > reference the solver is using is a different one. > > Can anyone help? > > Cheers, > > Philippe Guiblin > ONS London > > > > > > For the latest data on the economy and society > consult National Statistics at http://www.statistics.gov.uk > > ********************************************************************** > Please Note: Incoming and outgoing email messages > are routinely monitored for compliance with our policy > on the use of electronic communications > ********************************************************************** > Legal Disclaimer : Any views expressed by > the sender of this message are not necessarily > those of the Office for National Statistics > ********************************************************************** > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ ___________________________________________________________________________________________________ Visit the web site of the Financial Times at http://www.ft.com