<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can I pass on a point as a parameter to sub or function in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9361129#M4851</link>
    <description>&lt;P&gt;Thanks for the quick response. I got the following error message &lt;span class="lia-unicode-emoji" title=":frowning_face:"&gt;☹️&lt;/span&gt;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Duplicate declaration in current scope&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am experimenting something from Excel and entire code is within Excel VBA environment. On a command click event in excel I am collecting information from various Excel cells into the local variable. And then I am calling a sub which is is defined as a public procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nimish&lt;/P&gt;</description>
    <pubDate>Thu, 05 Mar 2020 17:18:19 GMT</pubDate>
    <dc:creator>parikhnidi</dc:creator>
    <dc:date>2020-03-05T17:18:19Z</dc:date>
    <item>
      <title>Can I pass on a point as a parameter to sub or function</title>
      <link>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9360786#M4849</link>
      <description>&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A new comer here. I am trying to write a sub where one of the parameter is a point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub DrawBoltPattern(Location(0 to 2) as Double, XCount as Integer, XDistance as Double, YCount as Interger, YDistance as Double, RotationAngle As Double)&lt;/P&gt;&lt;P&gt;Some code goes here.&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is location is a point variable that will be processed in the sub to calculate various points. What parameter type should be declared in the sub deinition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nimish&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 15:21:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9360786#M4849</guid>
      <dc:creator>parikhnidi</dc:creator>
      <dc:date>2020-03-05T15:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can I pass on a point as a parameter to sub or function</title>
      <link>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9360896#M4850</link>
      <description>&lt;P&gt;This works.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sub pointTest()
    Dim pt(0 To 2) As Double
    pt(0) = 0#
    pt(1) = 1#
    pt(2) = 2#
    
    ptTest (pt)
    
End Sub

Sub ptTest(Point As Variant)
    MsgBox " pt(x) = " &amp;amp; Point(0) &amp;amp; vbCr &amp;amp; _
           " pt(y) = " &amp;amp; Point(1) &amp;amp; vbCr &amp;amp; _
           " pt(z) = " &amp;amp; Point(2)
    
End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Mar 2020 15:59:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9360896#M4850</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2020-03-05T15:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can I pass on a point as a parameter to sub or function</title>
      <link>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9361129#M4851</link>
      <description>&lt;P&gt;Thanks for the quick response. I got the following error message &lt;span class="lia-unicode-emoji" title=":frowning_face:"&gt;☹️&lt;/span&gt;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Duplicate declaration in current scope&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am experimenting something from Excel and entire code is within Excel VBA environment. On a command click event in excel I am collecting information from various Excel cells into the local variable. And then I am calling a sub which is is defined as a public procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nimish&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 17:18:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9361129#M4851</guid>
      <dc:creator>parikhnidi</dc:creator>
      <dc:date>2020-03-05T17:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can I pass on a point as a parameter to sub or function</title>
      <link>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9361159#M4852</link>
      <description>&lt;LI-CODE lang="markup"&gt;Sub pointTest()
    Dim pt(0 To 2) As Double
    pt(0) = 0#
    pt(1) = 1#
    pt(2) = 2#
    
    ptTest (pt)
    
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;should be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sub pointTest()
    Dim pt(0 To 2) As Double
    pt(0) = 0#
    pt(1) = 1#
    pt(2) = 2#
    
    ptTest pt
    
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 17:27:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9361159#M4852</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2020-03-05T17:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can I pass on a point as a parameter to sub or function</title>
      <link>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9361228#M4853</link>
      <description>&lt;P&gt;Never mind. I found the typo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all for your inputs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nimish&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 17:58:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/can-i-pass-on-a-point-as-a-parameter-to-sub-or-function/m-p/9361228#M4853</guid>
      <dc:creator>parikhnidi</dc:creator>
      <dc:date>2020-03-05T17:58:54Z</dc:date>
    </item>
  </channel>
</rss>

