Results 1 to 6 of 6

Thread: what's wrong with this?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2001
    Location
    Maumelle, AR
    Posts
    624

    Angry what's wrong with this?

    Code:
    ListView3.ListItems.Add "Playlist Filecount: " & ListView2.ListItems.Count & "Total Length: "

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    The Add method has a lot of arguments for a start

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    What are you trying to acheive?

    Is filecount and total length different columns?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Your adding syntax is incorrect. You need to dimension as variable as ListItem, and then so a Set,:
    VB Code:
    1. Dim MyItem As ListItem
    2. Set MyItem = ListView1.ListItems.Add(, , FieldName.Value)

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2001
    Location
    Maumelle, AR
    Posts
    624

    ok, like this.....

    Heres what I want to do:

    I want to add a listitem to the list that reads like this:

    Playlist Filecount: (here I want it to put the count of the files in listview2) .


    I was hoping I could do it this way to avoid using multiple columns. If this won't work, I guess I have to use multiple columns.

    P.S. Is there an EASIER way to set column width than just by trial and error. It seems I have to reset it and run the program evertime to see if something is going to fit.

  6. #6
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Originally posted by Hack
    Your adding syntax is incorrect. You need to dimension as variable as ListItem, and then so a Set
    VB Code:
    1. ListView1.ListItems.Add(, , FieldName.Value)
    will do, no need for other variables, but he's missing a load of arguments...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width