<?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: how to &amp;quot;if&amp;quot; an  Optional  in a function. in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160451#M21559</link>
    <description>Sorry. Where I use it the variable is a class I have defined. As well as Jason's explanation 0 may be the suitable default value for an Integer.&lt;BR /&gt;
&lt;BR /&gt;
Regards - Nathan</description>
    <pubDate>Mon, 21 Jan 2008 23:08:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-01-21T23:08:13Z</dc:date>
    <item>
      <title>how　to　"if" an  Optional  in a function.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160446#M21554</link>
      <description>hi,&lt;BR /&gt;
&lt;BR /&gt;
i　wonder　how　to　"if" an  Optional  in a function.&lt;BR /&gt;
&lt;BR /&gt;
Function OneObjGetbyFeeler(cl As AcadCircle, Optional clNm As Integer)&lt;BR /&gt;
&lt;BR /&gt;
'i mean when clNm is not necessary how to say by if statement,&lt;BR /&gt;
&lt;BR /&gt;
'for example ,&lt;BR /&gt;
&lt;BR /&gt;
If Not clNm &amp;lt; 0 Then&lt;BR /&gt;
&lt;BR /&gt;
thanks</description>
      <pubDate>Mon, 21 Jan 2008 15:12:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160446#M21554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-21T15:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: how　to　"if" an  Optional  in a function.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160447#M21555</link>
      <description>The ismissing function works well for this, but you must pass it a variant.   IsMissing(vPoint)&lt;BR /&gt;
In the example you offer &lt;BR /&gt;
Optional col As Integer = 256  is what I use</description>
      <pubDate>Mon, 21 Jan 2008 15:59:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160447#M21555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-21T15:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: how　to　"if" an  Optional  in a function.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160448#M21556</link>
      <description>You can set a default value in the declaration.&lt;BR /&gt;
&lt;BR /&gt;
Function OneObjGetbyFeeler(cl As AcadCircle, Optional clNm As Integer = Nothing)&lt;BR /&gt;
&lt;BR /&gt;
If clNm = Nothing then</description>
      <pubDate>Mon, 21 Jan 2008 21:36:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160448#M21556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-21T21:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to "if" an  Optional  in a function.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160449#M21557</link>
      <description>That compiles for you?&lt;BR /&gt;
Looks like invalid use of Object error here&lt;BR /&gt;
&lt;BR /&gt;
&lt;NATHAN taylor=""&gt; wrote in message news:5826142@discussion.autodesk.com...&lt;BR /&gt;
You can set a default value in the declaration.&lt;BR /&gt;
&lt;BR /&gt;
Function OneObjGetbyFeeler(cl As AcadCircle, Optional clNm As Integer = &lt;BR /&gt;
Nothing)&lt;BR /&gt;
&lt;BR /&gt;
If clNm = Nothing then&lt;/NATHAN&gt;</description>
      <pubDate>Mon, 21 Jan 2008 21:59:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160449#M21557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-21T21:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to "if" an  Optional  in a function.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160450#M21558</link>
      <description>You have to pass your optional argument as a variant data type. Otherwise you can't set the value to Nothing.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub test(ByVal a As String, Optional ByVal b As Variant = Nothing)&lt;BR /&gt;
...&lt;BR /&gt;
End Sub</description>
      <pubDate>Mon, 21 Jan 2008 22:11:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160450#M21558</guid>
      <dc:creator>jbooth</dc:creator>
      <dc:date>2008-01-21T22:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to "if" an  Optional  in a function.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160451#M21559</link>
      <description>Sorry. Where I use it the variable is a class I have defined. As well as Jason's explanation 0 may be the suitable default value for an Integer.&lt;BR /&gt;
&lt;BR /&gt;
Regards - Nathan</description>
      <pubDate>Mon, 21 Jan 2008 23:08:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-quot-if-quot-an-optional-in-a-function/m-p/2160451#M21559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-21T23:08:13Z</dc:date>
    </item>
  </channel>
</rss>

