<?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: ITableSort Sort method in VBA in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablesort-sort-method-in-vba/m-p/79305#M2107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Not totally sure, but I believe that the ITable.Sort method accepts a parameter of ITrackCancel, which is why you just specify "Nothing" on:&lt;BR /&gt;&lt;BR /&gt;pTableSort.Sort &lt;STRONG&gt;Nothing&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I don't think it should affect your success or not and I am usure of why you are getting the behavior you seem to be experiencing.&amp;nbsp; What version of ArcGIS are you running?&amp;nbsp; Unless I am missing something obvious, I don't necessarily think anything is wrong with your code.&amp;nbsp; Anyway, here is exact code sample from the EDN site:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/ITableSort.htm"&gt;http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/ITableSort.htm&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Woud you please explain what ITrackCancel parameter is about?&amp;nbsp; I am using ArcGIS 9.2.&amp;nbsp; My code was modeling the same code sample.&amp;nbsp; Before trying this macro, I had more sever problem with the following macro:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pTable As ITable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pTable = pTableProperty.table&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pTableSort As ITableSort&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pTableSort = New tableSort&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pTableSort.table = pTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pTablesort.Fields = "OBJECT_ID, UFI"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pTableSort.Sort&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The queer thing is, in this case, when I typed pTableProperty.Table, it automatically changed to pTableProperty.table (with small t), and also New TableSort changed to New tableSort (with small t), and also pTableSort.Table changed to pTableSort.table (small t).&amp;nbsp; Do you know why is it?&amp;nbsp; Anyhow, with this macro, when run, it gave me a big problem, about which I had put up the following thread in the forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Quote)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added a few code lines of macro in ArcGIS VBA Editor and tried to run it, but a Compile error: Argument not optional window appeared. I clicked OK button or close button on the window, but the window didn't close. Now, when I try to close the VBA Editor window itself, it will not close either. I was stuck with it, I could not close the ArcMap. To get out of it, I had to turn off my computer. After that, when I tried to open up the .mxd file again, the ArcMap just shows the VBA Editor again with the same Compile error window which as before will not be closed with the click of OK button or close button. How can I close the editior and access all the codes that I have been working on? The .mxd file has many macros that I have created. How can I access them? I am in a dire situation! Could someone help me out? I would appreciate your help!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kyung &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Unquote)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attaching here the error message window that appeared as mentioned in the thread for your reference.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After this thread, I could find the previous version of the .mxd file and I could continue to make the macro, and put up a thread to which you replied... Could all these background ring a bell to you?&amp;nbsp; I hope so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kyung&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Feb 2011 12:23:07 GMT</pubDate>
    <dc:creator>KyungKim</dc:creator>
    <dc:date>2011-02-23T12:23:07Z</dc:date>
    <item>
      <title>ITableSort Sort method in VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablesort-sort-method-in-vba/m-p/79303#M2105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using my VBA codes, I was trying to sort an attribute table based on two fields, but the ArcMap stopped working immediately after the codes were run.&amp;nbsp; Actualy, the codes were composed based on sample codes to the best of my guess; particularly, I don't understand why "Nothing" is put there on the last line.&amp;nbsp; Would someone please explain about it and how to complete the macro for it to run well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; -----&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; -----&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pTableSort As ITableSort&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pTableSort = New esriGeoDatabase.TableSort&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pTable As ITable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pTable = pTableProperty.Table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pTableSort.Table = pTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTableSort.Fields = "OBJECT_ID, UFI"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTableSort.Ascending("OBJECT_ID") = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTableSort.Ascending("UFI") = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTableSort.Sort Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kyung&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 17:16:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablesort-sort-method-in-vba/m-p/79303#M2105</guid>
      <dc:creator>KyungKim</dc:creator>
      <dc:date>2011-02-22T17:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: ITableSort Sort method in VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablesort-sort-method-in-vba/m-p/79304#M2106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I don't understand why "Nothing" is put there on the last line.&amp;nbsp; Would someone please explain about it and how to complete the macro for it to run well?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Not totally sure, but I believe that the ITable.Sort method accepts a parameter of ITrackCancel, which is why you just specify "Nothing" on:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pTableSort.Sort &lt;/SPAN&gt;&lt;STRONG&gt;Nothing&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think it should affect your success or not and I am usure of why you are getting the behavior you seem to be experiencing.&amp;nbsp; What version of ArcGIS are you running?&amp;nbsp; Unless I am missing something obvious, I don't necessarily think anything is wrong with your code.&amp;nbsp; Anyway, here is exact code sample from the EDN site:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/ITableSort.htm"&gt;http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/ITableSort.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 17:36:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablesort-sort-method-in-vba/m-p/79304#M2106</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-02-22T17:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: ITableSort Sort method in VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablesort-sort-method-in-vba/m-p/79305#M2107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Not totally sure, but I believe that the ITable.Sort method accepts a parameter of ITrackCancel, which is why you just specify "Nothing" on:&lt;BR /&gt;&lt;BR /&gt;pTableSort.Sort &lt;STRONG&gt;Nothing&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I don't think it should affect your success or not and I am usure of why you are getting the behavior you seem to be experiencing.&amp;nbsp; What version of ArcGIS are you running?&amp;nbsp; Unless I am missing something obvious, I don't necessarily think anything is wrong with your code.&amp;nbsp; Anyway, here is exact code sample from the EDN site:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/ITableSort.htm"&gt;http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/ITableSort.htm&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Woud you please explain what ITrackCancel parameter is about?&amp;nbsp; I am using ArcGIS 9.2.&amp;nbsp; My code was modeling the same code sample.&amp;nbsp; Before trying this macro, I had more sever problem with the following macro:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pTable As ITable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pTable = pTableProperty.table&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pTableSort As ITableSort&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pTableSort = New tableSort&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pTableSort.table = pTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pTablesort.Fields = "OBJECT_ID, UFI"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pTableSort.Sort&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The queer thing is, in this case, when I typed pTableProperty.Table, it automatically changed to pTableProperty.table (with small t), and also New TableSort changed to New tableSort (with small t), and also pTableSort.Table changed to pTableSort.table (small t).&amp;nbsp; Do you know why is it?&amp;nbsp; Anyhow, with this macro, when run, it gave me a big problem, about which I had put up the following thread in the forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Quote)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added a few code lines of macro in ArcGIS VBA Editor and tried to run it, but a Compile error: Argument not optional window appeared. I clicked OK button or close button on the window, but the window didn't close. Now, when I try to close the VBA Editor window itself, it will not close either. I was stuck with it, I could not close the ArcMap. To get out of it, I had to turn off my computer. After that, when I tried to open up the .mxd file again, the ArcMap just shows the VBA Editor again with the same Compile error window which as before will not be closed with the click of OK button or close button. How can I close the editior and access all the codes that I have been working on? The .mxd file has many macros that I have created. How can I access them? I am in a dire situation! Could someone help me out? I would appreciate your help!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kyung &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Unquote)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attaching here the error message window that appeared as mentioned in the thread for your reference.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After this thread, I could find the previous version of the .mxd file and I could continue to make the macro, and put up a thread to which you replied... Could all these background ring a bell to you?&amp;nbsp; I hope so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kyung&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 12:23:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablesort-sort-method-in-vba/m-p/79305#M2107</guid>
      <dc:creator>KyungKim</dc:creator>
      <dc:date>2011-02-23T12:23:07Z</dc:date>
    </item>
  </channel>
</rss>

