AnsweredAssumed Answered

vrf FW: ActiveX using Microsoft Excel

Question asked by gregwale on Oct 19, 2003
Latest reply on Oct 19, 2003 by gregwale
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><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:Wingdings;     panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face     {font-family:Tahoma;     panose-1:2 11 6 4 3 5 4 4 2 4;}@font-face     {font-family:"Comic Sans MS";     panose-1:3 15 7 2 3 3 2 2 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;}@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'>Richard,</span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>Also, Vxl copies a sheet automatically tothe end of the workbook when sending 3d arrays, or a record array as discussedin some of the recent VEE days seminars. I also explained using built-in functions/ Type Conversion / asVariantNull() from Vee 6.x.  Didn’t you attend</span></font><font size=2 color=navy face=Wingdings><span style='font-size:10.0pt;font-family:Wingdings;color:navy'>J</span></font><font size=2color=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'>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'><a href="http://www.passtechnologies.com/">www.passtechnologies.com</a></span></font></p><p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>free demo at: <ahref="http://www.passtechnologies.com/vxlpage.html">www.passtechnologies.com/vxlpage.html</a></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> Brown, Michael L CAR [mailto:Michael.L.Brown@carrier.utc.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'>Wednesday, October 15, 2003</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'>12:34 PM</span></font><fontsize=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
<b><span style='font-weight:bold'>Subject:</span></b> RE: FW: ActiveX usingMicrosoft Excel</span></font></p><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p><div><p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>Richard,</span></font></p></div><div><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p></div><div><p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>Attached is a solution incorporating Tom'ssuggestion and an example using a null variant for Before so that you can placethe copied sheet after a specified sheet.</span></font></p></div><div><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p></div><div><p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>Regards,</span></font></p></div><div><p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>Michael</span></font></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 face=Tahoma><spanstyle='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----
<b><span style='font-weight:bold'>From:</span></b> tom.vanttinen@nokia.com[mailto:tom.vanttinen@nokia.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'>Tuesday, October 14, 2003</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'>4:11 AM</span></font><font size=2face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
<b><span style='font-weight:bold'>To:</span></b> VEE vrf
<b><span style='font-weight:bold'>Subject:</span></b> [vrf] FW: ActiveX usingMicrosoft Excel</span></font></p><div><p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>Try following:</span></font></p></div><div><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p></div><div><p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>app.Workbooks(1).Sheets.Item("Sheet1").Copy(app.Workbooks(2).Sheets.Item("Sheet1"));</span></font></p></div><div><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p></div><div><p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>TOM</span></font></p></div><div><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p></div><blockquote style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 face=Tahoma><spanstyle='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----
<b><span style='font-weight:bold'>From:</span></b> ext Bomar, Richard [mailto:richard.bomar@pw.utc.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'>10 October, 2003</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'>19:09</span></font><font size=2face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
<b><span style='font-weight:bold'>To:</span></b> VEE vrf
<b><span style='font-weight:bold'>Subject:</span></b> [vrf] ActiveX usingMicrosoft Excel</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I am currently trying to copy sheets from one workbook toanother using Excel via VEE. I have not been able to find the proper sequence/syntaxfor copying sheets within the same workbook, much less different workbooks.Does anyone have an example or has successfully completed such a task ? Themacro recorder in Excel returned the following when I copy a sheet to the sameworkbook in Excel:</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'>Sheets("Sheet1").Select</span></font></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Sheets("Sheet1").Copy Before:=Sheets(1)</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=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'>The only syntax which works in VEE is the following:</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'>ExcelApp.Sheets("Sheet1").Copy();</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'>If I try to use the Before or After variant, VEE returns thefollowing error: "ActiveX......Unable to get the Copy property of theWorkSheet class."</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'>Any assistance will be greatly appreciated.</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><b><i><font size=3 color=blue face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:blue;font-weight:bold;font-style:italic'><img border=0 width=66 height=75src="1_multipart/2_image001.jpg"></span></font></i></b></p><p class=MsoNormal><b><i><font size=3 color=blue face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:blue;font-weight:bold;font-style:italic'>Standards Laboratory</span></font></i></b></p><p class=MsoNormal><b><i><font size=6 color=blue face="Comic Sans MS"><spanstyle='font-size:26.0pt;font-family:"Comic Sans MS";color:blue;font-weight:bold;font-style:italic'>Richard D. Bomar</span></font></i></b></p><p class=MsoNormal><b><i><font size=3 color=blue face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:blue;font-weight:bold;font-style:italic'>MCSE,MCP, MCP+I,</span></font></i></b></p><p class=MsoNormal><b><i><font size=3 color=blue face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:blue;font-weight:bold;font-style:italic'>E-mail:  richard.bomar@pw.utc.com</span></font></i></b></p><p class=MsoNormal><b><i><font size=3 color=blue face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:blue;font-weight:bold;font-style:italic'>Phone:  561-796-1224</span></font></i></b></p><p class=MsoNormal><b><i><font size=3 color=blue face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:blue;font-weight:bold;font-style:italic'>Beeper: 561-754-8201</span></font></i></b></p><p class=MsoNormal><b><i><font size=3 color=blue face=Arial><spanstyle='font-size:12.0pt;font-family:Arial;color:blue;font-weight:bold;font-style:italic'>Fax:       860-755-8895</span></font></i></b></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=3 face="Times New Roman"><span style='font-size:12.0pt'><img border=0 width=279 height=93 src="1_multipart/3_image002.gif"></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=3 face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p></blockquote><p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>---
You are currently subscribed to vrf as: Michael.L.Brown@carrier.utc.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@it.lists.it.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: Michael.L.Brown@carrier.utc.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@it.lists.it.agilent.com".
If you need help with the mailing list send a message to"owner-vrf@it.lists.it.agilent.com". </span></font></p></blockquote></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@it.lists.it.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