AnsweredAssumed Answered

vrf Using MS Excel Solver from a VEE 6.0 Program

Question asked by gregwale on Oct 31, 2004
Latest reply on Nov 1, 2004 by VRFuser
<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 10 (filtered)"><style><!-- /* Font Definitions */ @font-face     {font-family:Tahoma;     panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal     {margin:0in;     margin-bottom:.0001pt;     font-size:12.0pt;     font-family:"Times New Roman";}a:link, span.MsoHyperlink     {color:blue;     text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed     {color:purple;     text-decoration:underline;}span.emailstyle17     {font-family:Arial;     color:windowtext;}span.emailstyle18     {font-family:Arial;     color:navy;}span.EmailStyle19     {font-family:Arial;     color:navy;}@page Section1     {size:8.5in 11.0in;     margin:1.0in 1.25in 1.0in 1.25in;}div.Section1     {page:Section1;}--></style></head><body lang=EN-US link=blue vlink=purple><div class=Section1><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Hi Nick,</span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>I sell an add-in to VEE called Vxl forexactly what you want: connecting data to Excel. I also ship numerous VEEexamples including calling an Excel macro. </span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>It is for sale on my website. Also on myhome page click on Technical Articles if you want to see an article on ActiveXfrom VEE 5 in case you want to try writing in ActiveX yourself. </span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Best regards,</span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>Greg Wale</span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>www.passtechnologies.com</span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----
<b><span style='font-weight:bold'>From:</span></b> Guzzardo, Nick[mailto:NBG@ssitech.com]
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Friday, October 29, 2004</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>11:04 AM</span></font><fontsize=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
<b><span style='font-weight:bold'>Subject:</span></b> Using MS Excel Solverfrom a VEE 6.0 Program</span></font></p><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I need to access the Solver add-in function in MS Excel froma VEE 6.0 program to solve a system of 4 non-linear equations. Specifically, I am taking 4 resistance measurements from a resistor bridge andneed to calculate the individual resistor values within the bridge.</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I have written a macro in Excel to simplify the processwithin Excel, so I need to be able to insert data to a spreadsheet, run mymacro, and extract the results.  I know that you can access just aboutanything in Excel using ActiveX, but I have never used it before this.  Ihave seen the ActiveX examples, but they have not gotten me past the insertionand extraction of the data.</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>My macro is listed below:</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Sub WheatstoneSolver()</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>'</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>' WheatstoneSolver Macro</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>'</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>' Keyboard Shortcut: Ctrl+l</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>'</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>    SolverReset</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>    SolverLoad LoadArea:="$A$12:$A$18"</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>    SolverOptions MaxTime:=100,Iterations:=100, Precision:=0.000001, AssumeLinear _</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>        :=False, StepThru:=False,Estimates:=1, Derivatives:=1, SearchOption:=1, _</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>        IntTolerance:=5,Scaling:=False, Convergence:=0.0001, AssumeNonNeg:=False</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>    SolverOk SetCell:="$D$6", MaxMinVal:=3,ValueOf:="0", ByChange:="$B$1:$B$4"</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>    SolverSolve userFinish:=True</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>End Sub</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Does anyone know how to access Excel macros or even accessthe Excel Solver directly from within VEE?</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Are there any free resources on the internet for usingActiveX?</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Nick G.</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>SSI Technologies, Inc.</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>608-373-2234</span></font></p><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p></div></div>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></html>  

Outcomes