hatman
Well-known Member
- Joined
- Apr 8, 2005
- Messages
- 2,664
So I like to use the ListView control where most people might be inclined to use ListBoxes. When you add a ListView to your project, Excel automatically adds a reference to the MSComctlLib library. This has worked FINE for 10 years or more.
One of my users suddenly started with an error yesterday, which I quickly found a solution to in This Article. I thought this was fixed, but it got loopy from here.
Upon restart, one of my forms with the ListView located directly on the USerform worked fine, but another form that has 6 ListViews one on each page a multipage, I get an error message indicating that the Referenced "Library Feature Not Supported", so I hit OKAY, and then I'm in Debug mode with the ListView control name highlighted in the Initialize code (me.[highlight]listview_Name[/highlight]). I stop the debugger, and then compile the project, and get an error that "Method or Data Member Not Found" for the properties of this code:
Which is the code that is called by the initialize event of teh userform with the listview that is causing teh error.
At this point, I tried unchecking the reference to the MSComctlLib Library, closed the references dialog. Then, I added a new Listview to a random form in teh project, allowing the automatic library reference to be built, and then deleted the control. Then I ran the form with the problem, and the code worked fine.... the project compiled fine. No problems. But I close and re-open the file, and everything is back to not working.
It gets more fun. This all repeated itself with a second computer this morning. The common thread? Both of these users are running Microsoft Visio 2010.
All that beng said, I wonder if the problem might not be related to the compatibility issue that exists when placing a listview in a Multipage container. And if so, what I can do to work around the issue. This isn't a place where I can justify changing this whole section of my UI just because 2 computers out of about 1000 are having a problem... then again, as we move to Windows 2010 over the course of the next couple of years, this may become more prevalent.
One of my users suddenly started with an error yesterday, which I quickly found a solution to in This Article. I thought this was fixed, but it got loopy from here.
Upon restart, one of my forms with the ListView located directly on the USerform worked fine, but another form that has 6 ListViews one on each page a multipage, I get an error message indicating that the Referenced "Library Feature Not Supported", so I hit OKAY, and then I'm in Debug mode with the ListView control name highlighted in the Initialize code (me.[highlight]listview_Name[/highlight]). I stop the debugger, and then compile the project, and get an error that "Method or Data Member Not Found" for the properties of this code:
Code:
Sub List_View_Initialize(L_View As ListView)
With L_View
.View = lvwReport
.Sorted = True
.SortOrder = lvwAscending
.FullRowSelect = False
.AllowColumnReorder = True
.Gridlines = True
.LabelEdit = lvwAutomatic
.Font.Size = 10
.Font.Bold = False
End With
End Sub
Which is the code that is called by the initialize event of teh userform with the listview that is causing teh error.
At this point, I tried unchecking the reference to the MSComctlLib Library, closed the references dialog. Then, I added a new Listview to a random form in teh project, allowing the automatic library reference to be built, and then deleted the control. Then I ran the form with the problem, and the code worked fine.... the project compiled fine. No problems. But I close and re-open the file, and everything is back to not working.
It gets more fun. This all repeated itself with a second computer this morning. The common thread? Both of these users are running Microsoft Visio 2010.
All that beng said, I wonder if the problem might not be related to the compatibility issue that exists when placing a listview in a Multipage container. And if so, what I can do to work around the issue. This isn't a place where I can justify changing this whole section of my UI just because 2 computers out of about 1000 are having a problem... then again, as we move to Windows 2010 over the course of the next couple of years, this may become more prevalent.