Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ListView in VBA

Posted on 2003-03-02
3
Medium Priority
?
1,063 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
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

571 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