|
-
Oct 13th, 2000, 08:25 AM
#1
Thread Starter
Junior Member
Help....why won't this work?
Dim itemAdd as ListItem
Set itmAdd = ListView1.ListItems.Add(Text:=sNext)
I get a type mismatch. sNext is a string
-
Oct 13th, 2000, 08:30 AM
#2
Hyperactive Member
Try This:
Code:
Dim Snext As String
Snext = "String"
ListView1.ListItems.Add , , Snext
-
Oct 13th, 2000, 08:33 AM
#3
Hyperactive Member
Or it's because you did this:
Dim itemAdd as ListItem
Set itmAdd = ListView1.ListItems.Add(Text:=sNext)
But you names the listitem itemadd and the set thing itmadd.
-
Oct 13th, 2000, 08:47 AM
#4
Frenzied Member
Code:
Dim itemAdd As String
Dim sNext As String
sNext = "JOPPPPP!"
itemAdd = ListView1.ListItems.Add(1, "Key1", sNext)
works for me.
For spellchecking in variables be sure to check this box:
Click in the VB IDE: TOOLS > OPTIONS > and check REQUIRE VARIABLE DECLARATION
this way you don't have to deal with undeclared variables.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|