Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SOLVER THAT CALL DLL SUB!
Replace the 'sub' in the DLL with a 'function' (i.e., return the desired
value as the value of the function) and treat this function as a User Defined Function (UDF). This will make it part of the Excel calculation chain and Excel will know when and how to recalculate the UDF. Solver assumes it is in complete control of the worksheet and having event driven routines make changes *may* not -- I am not sure -- play well with Solver. I've learnt the hard way to not mess with the worksheet while Solver is doing its thing. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article .com, says... Hi I would use the solver in order to find a value such that a cell=0 (it A3) . This cells is the difference between A1 and A2 IE a1=4 a2= output of sub of a void in c++ . This sub has as input b1 a3=a1-a2 Changing b1 that is an input of the dll. I should set a3=0 changing b1 but I need to recalculate every time the sub (output of dll) I tried with something (surely wrong) with worksheet change. If it runs ( often the event doesnt not trigger even if the event option is set =true) but I have an runtime error ( maybe 467 ot 497 I dont remember!) The dll is stable enough and array are passed as safearray. Any idea? ths in advance G. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Having Solver Call a macro for each iteration | Excel Discussion (Misc queries) | |||
Problem solver call from vb6 | Excel Programming | |||
how can call up solver with a button | Excel Programming | |||
is there anyway to call the Solver add-in as a function? | Excel Programming | |||
is there anyway to call the Solver add-in as a function? | Excel Programming |