Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Runtime Error '-2147417848 (80010108) Method 'ListIndex' of object '

  Asked By: Madison    Date: Mar 09    Category: MS Office    Views: 2104
  

I'ven't received any reply for my below mail. Please help me. I tried a bit and
achieved it last week end. But now I don't know what the wrong I did, if I
select the first entry in the listbox1 it is working fine and then for other
entries it is giving an runtime error as Runtime Error '-2147417848 (80010108)
Method 'ListIndex' of object 'IMDcList' failed.

Kindly help me out to come out of this. I've my own deadline to complete this
assignment by tomorrow (end of this month). Please help me and suggest the
correct solution.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Dang Tran     Answered On: Mar 09

Use two columns in your list box, empID and empName. Set the first column
width to zero. Then the first column will be the key but you will only see
the names. (I leave it to you to work out how the user will guess which Alex
to select!) You will probably need to use a 2 dimensional array to set the
list items, although it could be done in a "for next" loop.

 
Answer #2    Answered By: Jamie Roberts     Answered On: Mar 09

Use two columns in your list box, empID and empName. Set the first column
width to zero. Then the first column will be the key but you will only see
the names. (I leave it to you to work out how the user will guess which Alex
to select!) You will probably need to use a 2 dimensional array to set the
list items, although it could be done in a "for next" loop.

 
Answer #3    Answered By: Flynn Jones     Answered On: Mar 09

Thanks for your support. I found out the issue and resolved with my old code
itself.

As I told you I kept the listbox2 as hidden, but unfortunately I made its width
to '0'. That's the issue I got this error. But now when I was working on all the
tools I kept slowly and steadily I found this and increased the width of
listbox2 to 40 and hide it behind the listbox1. Now it is working as phantastic.

Thanks for your support. I think I may need to use the columns function in the
listboxes in later. If I use then I'll use your suggestion.

 




Tagged: