Results 1 to 3 of 3

Thread: Type mismatch while trying to omit text [SOLVED]

  1. #1

    Thread Starter
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692

    Type mismatch while trying to omit text [SOLVED]

    I think I've posted a question like this in the past, but I have searched up and down these forums, and can't find it, so here I am.

    Anyways, this code causes a type mismatch:

    VB Code:
    1. For i = 1 To Dir1.ListCount
    2.     lvwDirListings.ListItems.Add , , Dir1.List(i) - Left$(Dir1.List(i), 3)
    3. Next i

    The reason I'm trying to do this is because it shows "C:\dirname" instead of just "dirname" in the listview.

    I need to know how to properly omit text from a string-based variable. I used to know how to do this, but I forgot how.
    Last edited by hothead; Sep 13th, 2003 at 07:10 PM.

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    you mean

    Mid(Dir1.List(i),3) 'it's 3 or 4

    ?
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3

    Thread Starter
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692
    Yeah, that'll be it. Thanks.

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