+ Reply to Thread
Results 1 to 7 of 7

Invalid Property Array Index

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Invalid Property Array Index

    Keep getting this error when I type in a wrong name in the lookup movie form.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Invalid Property Array Index

    You have two userforms with combobox dropdowns.
    The one that works is put on the
    ComboBox1_Click() event.
    The one that errors is put on the
    ComboBox1_Change event.

    Put your code for the one that doesn't work in the Click event instead of change event.

    I think that will do it for you.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Invalid Property Array Index

    Thanks MarvinP that did the trick on taking away the error. The only bug I have now is when you type in a movie after one is selected it will not update the listbox?. When you use the arrow in the combobox everything works great,if you type in a second movie it does not update. It works ok in the lookup actor form, just not in the lookup movie form. any ideas on whats wrong.
    Z

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Invalid Property Array Index

    Hi zplugger,

    Here is how to find the differences. Using the VBA editor, view both sets of code behind your two userforms side by side. I've done this and Ctrl-Alt-PrtScrn it into my windows clipboard and pasted it onto sheet 3 of the attached file. Then you can look down the code behind both userforms and see what is different.
    To get both codes side by side you will need to click on the "Restore Window" icon which is just to the left of the "Close Window" red X icon on the top right of each window.

    Look at my example on sheet 3 of the attached and get to this point. Now read down both codes and see what is different and you'll be able to see why one is different than the other.

    I hope this helps.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Invalid Property Array Index

    Thanks again Marvin, I seen what I was doing wrong. The problem I'm having is very strange for me, I upload another form with more data. If you go too the lookup movie form and type in 8,
    8 Below will show up,but will not fill list box until you hit the space bar?. I don't think the space is the problem because I type in a 7 and it will fill in the listbox. If you type in 88 it works ok, something about 8.
    Z
    Attached Files Attached Files

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Invalid Property Array Index

    Hi,

    It looks like you need to alphabetize by Movie to have the movie dropdown to work correctly. I looked in the code for a vlookup or something that would require this sort but didn't see it. Perhaps when you do your Split and put the data in an array it stays there. You may need to empty the array before you go there again.

    It is a mystery to me.

  7. #7
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Invalid Property Array Index

    I think the problem is on page 2 my movie list, I have a space between numbers and words. Like the movie 8 Below has space, any movie without a space works ok. Not sure how to correct the code for using a space, or if it can be done. I think I need a expert to help on this.
    Z

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1