Keep getting this error when I type in a wrong name in the lookup movie form.
Keep getting this error when I type in a wrong name in the lookup movie form.
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.
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
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.
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
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.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks