?
Solved

ListView in VBA

Posted on 2003-03-02
3
Medium Priority
?
1,062 Views
Last Modified: 2013-12-26
I am trying to get a ListView control to work in VBA.
I am using the syntax that I have successfully employed in Visual Basic, ie

Set objdli = lvFind.ListItems.Add(, , "Test")

but this generates a "Type Mismatch" error.

Any ideas?
0
Comment
Question by:Scaleplan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Rhaedes earned 150 total points
ID: 8053669
Hmmm.... There is nothing wrong with the syntax. I've just tried it in VBA (Excel 2000) and it works fine with both version 5 (SP2) and 6 (SP4). Try removing the Dim statement for the objdli if you have one. You may have declared it wrongly.
0
 

Author Comment

by:Scaleplan
ID: 8053712
I'm using VBA in Business Objects Full Client - I wonder if this has any bearing?
0
 
LVL 5

Expert Comment

by:Rhaedes
ID: 8053782
Thanks for accepting the anwser - Did you Dim objdli? If so, how?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question