<?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 Visual Basic Listview errors in Acad 2015 (64 bit) in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5533810#M9767</link>
    <description>&lt;P&gt;I have a huge prolem with a VBA program, and while&amp;nbsp;I know&amp;nbsp;lisp, I'm a novice with Visual Basic.&amp;nbsp; The company I work for has a great inhouse&amp;nbsp;program that was written&amp;nbsp;in Visual Basic.&amp;nbsp; We are now all running 2015 on 64 bit machines and I've been working on upconverting the program with the VBA enbabler.&amp;nbsp; However, while everything else seems to be correct, I'm getting the error message, "Method or data member not found" for&amp;nbsp;"Listview1".&amp;nbsp;&lt;/P&gt;&lt;P&gt;After doing some research, it seems that this is a problem under 64 bit.&amp;nbsp; Is there a way to make this work or else subsitute it for another routine?&amp;nbsp; Here's a portion of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;'----------------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;'--- populates listview with point data from drawing&lt;BR /&gt;&amp;nbsp;'----------------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim pointblock As AcadBlockReference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Dim i As Integer&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim itmX As ListItem&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim itemis As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim colx As ColumnHeader&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '--- clear the listview table&lt;BR /&gt;&amp;nbsp;&amp;nbsp; frm_asurvey.ListView1.ListItems.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp; frm_asurvey.ListView1.ColumnHeaders.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 'lwidth = frm_asurvey.lst_points.width - 5 * screen.twipsperpixelx&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lwidth = 100&lt;BR /&gt;&amp;nbsp; 'Create and populate the listview&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Point #", 30)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Northing", lwidth)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Easting", lwidth)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Elevation", 70)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Description", 200)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "SORTON", 0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2015 19:22:20 GMT</pubDate>
    <dc:creator>craigmetts</dc:creator>
    <dc:date>2015-03-09T19:22:20Z</dc:date>
    <item>
      <title>Visual Basic Listview errors in Acad 2015 (64 bit)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5533810#M9767</link>
      <description>&lt;P&gt;I have a huge prolem with a VBA program, and while&amp;nbsp;I know&amp;nbsp;lisp, I'm a novice with Visual Basic.&amp;nbsp; The company I work for has a great inhouse&amp;nbsp;program that was written&amp;nbsp;in Visual Basic.&amp;nbsp; We are now all running 2015 on 64 bit machines and I've been working on upconverting the program with the VBA enbabler.&amp;nbsp; However, while everything else seems to be correct, I'm getting the error message, "Method or data member not found" for&amp;nbsp;"Listview1".&amp;nbsp;&lt;/P&gt;&lt;P&gt;After doing some research, it seems that this is a problem under 64 bit.&amp;nbsp; Is there a way to make this work or else subsitute it for another routine?&amp;nbsp; Here's a portion of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;'----------------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;'--- populates listview with point data from drawing&lt;BR /&gt;&amp;nbsp;'----------------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim pointblock As AcadBlockReference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Dim i As Integer&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim itmX As ListItem&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim itemis As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Dim colx As ColumnHeader&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '--- clear the listview table&lt;BR /&gt;&amp;nbsp;&amp;nbsp; frm_asurvey.ListView1.ListItems.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp; frm_asurvey.ListView1.ColumnHeaders.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 'lwidth = frm_asurvey.lst_points.width - 5 * screen.twipsperpixelx&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lwidth = 100&lt;BR /&gt;&amp;nbsp; 'Create and populate the listview&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Point #", 30)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Northing", lwidth)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Easting", lwidth)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Elevation", 70)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "Description", 200)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set colx = frm_asurvey.ListView1.ColumnHeaders.Add(, , "SORTON", 0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 19:22:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5533810#M9767</guid>
      <dc:creator>craigmetts</dc:creator>
      <dc:date>2015-03-09T19:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Basic Listview errors in Acad 2015 (64 bit)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5533844#M9768</link>
      <description>&lt;P&gt;You did not say, but it is very likely the ListView control you are refrerring to is from MSCOMCTL.ocx, which is 32-bit component, as you have already been aware of. If so, then the answer to your question is NO, you cannot make it work in 64-bit VBA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You either need to find a 64-biy replacement of it (unlikely), or use something else, or even port your VBA code to .NET API code. If you at least can do some reasonable VBA, a quick solution, easier and a bit ugly, is to use VBA built-in ListBox and to make it multiple columns, so the listbox would at least look like a the listview (if you use LIstView only with "Detail" view).&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 19:48:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5533844#M9768</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2015-03-09T19:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Basic Listview errors in Acad 2015 (64 bit)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5533895#M9769</link>
      <description>&lt;P&gt;Thanks Norman,&lt;/P&gt;&lt;P&gt;yes it's coming from MSCOMCTL.ocx and I read somewhere about&amp;nbsp;ListBox being an alternative.&amp;nbsp; Your reply confirms that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an example of how to make ListBox with multiple columns?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 20:27:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5533895#M9769</guid>
      <dc:creator>craigmetts</dc:creator>
      <dc:date>2015-03-09T20:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Basic Listview errors in Acad 2015 (64 bit)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5549154#M9770</link>
      <description>&lt;P&gt;I encountred a similar issue. &amp;nbsp;I wound up creating (in 32 bit VBA) a 'myListView' class where one of the properties is a listbox, and then added properties and functions that have the same names as those in a ListView -- that way, i didn't have to change a bunch of code to adapt each occurance of a listview to a list box. &amp;nbsp;I just had to swap out the listview (lvwSelections) for a listbox (lstSelections), and then in the code for the form, added a global instance of myListView (Public lvwSelections as New myListView) and set my 'grid' property to the listbox (lvwSelections.Grid = lstSelections). &amp;nbsp;I wound up having to create another half-dozen classes to support ColumnHeader, ListItem, &amp;amp; SubItem --&amp;nbsp;but it all worked pretty well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i loaded it into 64 bit AutoCAD, all i had to was some 64bit clean up (PtrSafe declerations, LongPtr, DoEvents before iterating collections, etc).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your interested it, i'll see if i can isolate these to a separate dvb file.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2015 19:04:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5549154#M9770</guid>
      <dc:creator>lando7189</dc:creator>
      <dc:date>2015-03-19T19:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Basic Listview errors in Acad 2015 (64 bit)</title>
      <link>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5777218#M9771</link>
      <description>&lt;P&gt;Looking around I found one that made their own functions to implement their own treeview in VBA for 64-bit with alot of functionality to choose from. I havent tested it yet but should work with downloading the excel version and export all classes, form, modules and import them to autocad and try to run it after changing were the data should come from. Have a look here: &lt;A href="http://jkp-ads.com/articles/treeview.asp" target="_self"&gt;http://jkp-ads.com/articles/treeview.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I hope it works for VBA 7.1 as well. I will probably have to use this.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2015 08:39:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/visual-basic-listview-errors-in-acad-2015-64-bit/m-p/5777218#M9771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-19T08:39:25Z</dc:date>
    </item>
  </channel>
</rss>

