Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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
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
Having Solver Call a macro for each iteration Andrew Harris Excel Discussion (Misc queries) 2 March 8th 10 04:27 AM
Problem solver call from vb6 xyfix Excel Programming 9 March 16th 07 02:15 PM
how can call up solver with a button Muzhik Excel Programming 2 August 15th 05 02:03 PM
is there anyway to call the Solver add-in as a function? Tushar Mehta Excel Programming 0 September 2nd 04 04:07 PM
is there anyway to call the Solver add-in as a function? Jerry W. Lewis Excel Programming 0 September 2nd 04 01:21 PM


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