<?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: Type Mismatch error in VBA for ArcGIS 10 in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274370#M7033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe FullName property is nothing...&amp;nbsp; I don't see the code that declares the IName variable, nor does it have the part that got the dataset enumeration.&amp;nbsp; Are you getting it from the document, the workspace, a featuredataset?&amp;nbsp; Do you have layers with broken paths, etc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2012 15:59:34 GMT</pubDate>
    <dc:creator>AlexanderGray</dc:creator>
    <dc:date>2012-11-20T15:59:34Z</dc:date>
    <item>
      <title>Type Mismatch error in VBA for ArcGIS 10</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274365#M7028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just trying out some of our old VBA code ArcGIS 10 and getting a type mismatch error where I should NOT be getting one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim DS as IDataSet&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set DS = MyTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim TableName As IName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set TableName = DS .FullName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error is thrown at "Set TableName = DS.FullName"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where TableName is IName and DS.FullName is IName.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This should not throw a Type Mismatch error but it is, and only in ArcGIS 10; all other previous versions work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 10:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274365#M7028</guid>
      <dc:creator>BradChappell</dc:creator>
      <dc:date>2010-08-06T10:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch error in VBA for ArcGIS 10</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274366#M7029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just trying out some of our old VBA code ArcGIS 10 and getting a type mismatch error where I should NOT be getting one. &lt;BR /&gt;&lt;BR /&gt;Here is the code:&lt;BR /&gt;Dim DS as IDataSet&lt;BR /&gt;Set DS = MyTable&lt;BR /&gt;Dim TableName As IName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Set TableName = DS .FullName&lt;BR /&gt;&lt;BR /&gt;The error is thrown at "Set TableName = DS.FullName"&lt;BR /&gt;Where TableName is IName and DS.FullName is IName.&lt;BR /&gt;This should not throw a Type Mismatch error but it is, and only in ArcGIS 10; all other previous versions work.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;HAS THERE BEEN ANY RESOLUTION TO THIS?&amp;nbsp; I'M HAVING THE SAME ISSUE.&amp;nbsp; THANKS.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 13:26:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274366#M7029</guid>
      <dc:creator>NancyPerini</dc:creator>
      <dc:date>2010-11-17T13:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch error in VBA for ArcGIS 10</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274367#M7030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just trying out some of our old VBA code ArcGIS 10 and getting a type mismatch error where I should NOT be getting one. &lt;BR /&gt;&lt;BR /&gt;Here is the code:&lt;BR /&gt;Dim DS as IDataSet&lt;BR /&gt;Set DS = MyTable&lt;BR /&gt;Dim TableName As IName &lt;BR /&gt;Set TableName = DS .FullName&lt;BR /&gt;&lt;BR /&gt;The error is thrown at "Set TableName = DS.FullName"&lt;BR /&gt;Where TableName is IName and DS.FullName is IName.&lt;BR /&gt;This should not throw a Type Mismatch error but it is, and only in ArcGIS 10; all other previous versions work.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any solution to this, as im having the same problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 09:18:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274367#M7030</guid>
      <dc:creator>HalilSiddique</dc:creator>
      <dc:date>2012-11-20T09:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch error in VBA for ArcGIS 10</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274368#M7031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I gave this a try on ArcGIS 10 SP5 and it worked ok...&amp;nbsp; The table was an Oracle table accessed through SDE.&amp;nbsp; In the original code, I noticed a space between the "DS" and ".FullName", probably just a copy/paste issue...&amp;nbsp; When converting VBA code from 9.3 mxds to 10, originally, I noticed that many of my references where pooched.&amp;nbsp; I had to go to tools, references and remove the missing ones, then it worked ok.&amp;nbsp; It seems VBA stops loading references as soon a it gets to a missing one, so if the one you need is after that in the list, it doesn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim mxd As IMxDocument
Set mxd = ThisDocument
Dim map As IMap
Set map = mxd.FocusMap

Dim tabcoll As ITableCollection
Set tabcoll = map

Dim tabl As ITable
Set tabl = tabcoll.Table(0)

Dim DS As IDataset
Set DS = tabl
Dim TableName As IName
Set TableName = DS.FullName
Dim dsName As IDatasetName
Set dsName = TableName

Debug.Print dsName.Name&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:23:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274368#M7031</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2021-12-11T13:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch error in VBA for ArcGIS 10</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274369#M7032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I gave this a try on ArcGIS 10 SP5 and it worked ok...&amp;nbsp; The table was an Oracle table accessed through SDE.&amp;nbsp; In the original code, I noticed a space between the "DS" and ".FullName", probably just a copy/paste issue...&amp;nbsp; When converting VBA code from 9.3 mxds to 10, originally, I noticed that many of my references where pooched.&amp;nbsp; I had to go to tools, references and remove the missing ones, then it worked ok.&amp;nbsp; It seems VBA stops loading references as soon a it gets to a missing one, so if the one you need is after that in the list, it doesn't work.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim mxd As IMxDocument
Set mxd = ThisDocument
Dim map As IMap
Set map = mxd.FocusMap

Dim tabcoll As ITableCollection
Set tabcoll = map

Dim tabl As ITable
Set tabl = tabcoll.Table(0)

Dim DS As IDataset
Set DS = tabl
Dim TableName As IName
Set TableName = DS.FullName
Dim dsName As IDatasetName
Set dsName = TableName

Debug.Print dsName.Name&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the suggestion, I've checked the references but nothing is missing. Here is the code im using&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Loop through the codepoint layer
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pDataset = pdatasets.Next
&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not (pDataset Is Nothing)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' MsgBox (pDataset.Name)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case pDataset.Type
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case esriDTFeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case pDataset.BrowseName
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "OS_VECTOR.OS_CODEPOINT"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pName = pDataset.FullName ===========FAILS HERE ==============
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set m_pCodePointClass = pName.Open
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Set pFCcodepoint = pName.Open
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MsgBox (pFCcodepoint.ShapeType)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pDataset = pdatasets.Next
&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried your code and it does work, so I'm confused.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274369#M7032</guid>
      <dc:creator>HalilSiddique</dc:creator>
      <dc:date>2021-12-11T13:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Type Mismatch error in VBA for ArcGIS 10</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274370#M7033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe FullName property is nothing...&amp;nbsp; I don't see the code that declares the IName variable, nor does it have the part that got the dataset enumeration.&amp;nbsp; Are you getting it from the document, the workspace, a featuredataset?&amp;nbsp; Do you have layers with broken paths, etc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 15:59:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/type-mismatch-error-in-vba-for-arcgis-10/m-p/274370#M7033</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2012-11-20T15:59:34Z</dc:date>
    </item>
  </channel>
</rss>

