<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>
<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>
I ended up brute forcing the program without ActiveX. The trick was in
sending the control key to start the macro. I eventually found from a
3rd part site that I should use "^L" for ctrl-L. As long as my Excel
window was the window in focus, the macro ran fine. Now if I could get
it to run with or without it being in focus!
Thanks again for the example program.
Nick G.
-----Original Message-----
From: decote@verizon.net [mailto:decote@verizon.net]
Sent: Monday, November 01, 2004 6:43 PM
To: VRF
Subject: [vrf] RE: Using MS Excel Solver from a VEE 6.0 Program
Hello Nick,
I have started on a project similar to yours; I have data in excel files
extracted from a Vee controlled measurement system. I need to take the
excel data which is in text format, create a series of graphs and resave
the data as an excel work book. I started by writing a macro while in
excel tools, so I have a complete set of steps necessary to complete the
work, now I just have to get those steps into my new Vee program. I
looked at the examples supplied with Vee and they are some help but not
a lot. I do have something else, my original vee program has commands in
it to open a new excel file, write headers, save date and close the
files. I plan to use these as a basis of my program and work it out from
there. I also have this nice book, Excel Programming, Read Less- Learn
More, from MaranGraphics, www.wiley.com/compbooks, which is full of good
information. Attached is a portion of the Vee programming with the excel
macro commands in it. You should be able to use the same Ve
e commands and copy and paste your program directly into them as I am
doing. Hope this helps, good luck.
Doug
************************************************************************
***************
-----Original Message-----
From: Guzzardo, Nick [mailto:NBG@ssitech.com]
Sent: Friday, October 29, 2004 11:04 AM
Subject: Using MS Excel Solver from a VEE 6.0 Program
I need to access the Solver add-in function in MS Excel from a VEE 6.0
program to solve a system of 4 non-linear equations. Specifically, I am
taking 4 resistance measurements from a resistor bridge and need to
calculate the individual resistor values within the bridge.
I have written a macro in Excel to simplify the process within Excel, so
I need to be able to insert data to a spreadsheet, run my macro, and
extract the results. I know that you can access just about anything in
Excel using ActiveX, but I have never used it before this. I have seen
the ActiveX examples, but they have not gotten me past the insertion and
extraction of the data.
My macro is listed below:
Sub WheatstoneSolver()
'
' WheatstoneSolver Macro
'
' Keyboard Shortcut: Ctrl+l
'
SolverReset
SolverLoad LoadArea:="$A$12:$A$18"
SolverOptions MaxTime:=100, Iterations:=100, Precision:=0.000001,
AssumeLinear _
:=False, StepThru:=False, Estimates:=1, Derivatives:=1,
SearchOption:=1, _
IntTolerance:=5, Scaling:=False, Convergence:=0.0001,
AssumeNonNeg:=False
SolverOk SetCell:="$D$6", MaxMinVal:=3, ValueOf:="0",
ByChange:="$B$1:$B$4"
SolverSolve userFinish:=True
End Sub
Does anyone know how to access Excel macros or even access the Excel
Solver directly from within VEE?
Are there any free resources on the internet for using ActiveX?
Nick G.
SSI Technologies, Inc.
608-373-2234
---
You are currently subscribed to vrf as: decote@verizon.net
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to
"leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".