Hi,
I copied code from another sheet into my own and I keep getting a variable not defined on "Listbox1" I'm not sure why. Can someone help me? Here is the code:
![]()
Please Login or Register to view this content.
Hi,
I copied code from another sheet into my own and I keep getting a variable not defined on "Listbox1" I'm not sure why. Can someone help me? Here is the code:
![]()
Please Login or Register to view this content.
Last edited by janeml; 07-07-2013 at 07:36 PM.
It means that you don't have an object named "Listbox1". You need to change it the real name of the listbox you are using.
Please consider:
Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Plan_Sample.xlsm
I did change the object name to Listbox1, and I'm still getting the same error.
I've attached a copy of the worksheet.
Essentially, the Populate List Box button is suppose to populate the box w/ checkbox options for users to select what variables they have to have appear on the graph. I was also wondering if it's possible to have a macro that unchecks everything so the user wont have to uncheck one by one.
Thanks!
Since the listbox is in a worksheet and you are running code from a standard module, you have to tell Excel where to find the listbox. Therefore a simple modification is needed:
EDIT : Here you will find code to uncheck all the choices.![]()
Please Login or Register to view this content.
abousetta
Last edited by abousetta; 07-07-2013 at 07:05 PM.
Did the file you copied this from have a userform?
Thanks,
Solus
Please remember the following:
1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.Highlight the code in your post and press the # button in the toolbar.2. Show appreciation to those who have helped you by clickingbelow their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
"Slow is smooth, smooth is fast."
Hi Solus, yes it did.
You will need that userform. It seems to have the listbox and all the option buttons. These macros won't work without them.
You will have to recreate the userform in the new workbook.
somehow...I got it to work within the workbook. Thank you Abousetta and Solus!
Thanks for the feedback.
Good luck.
abousetta
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks