Results 1 to 2 of 2

Thread: Problem assigning value to key in listview

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Hi,

    I'm trying to assign a value to a key in a listview. But it keeps telling me that it's an invalid key.

    I suspect that the problem is that the key is looking for a string but I was trying to assign it a number. But I thought that you can convert a number to a string by using the CStr() function... I tried CStr(1) for the key but it still gives me an invalid key error.

    Any help would be appreciated..


    Dan

  2. #2
    Guest
    I believe your key has to be truly alpha. One way around this is to append a letter to your number like:

    intYourIndex & "K"

    In your example you'd get '1K'.

    To easily strip out the letter part of your keys you can use the Val() function.

    Val("1K") = 1


    Paul

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