Hi,
I'm trying to assign a list box to a variable using Set statement, but getting an error.
what am i doing wrong?![]()
Please Login or Register to view this content.
Thanks!!
yonyon
Hi,
I'm trying to assign a list box to a variable using Set statement, but getting an error.
what am i doing wrong?![]()
Please Login or Register to view this content.
Thanks!!
yonyon
More to the point what exactly are you trying to do? Why would you want to do thios?
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
I'm trying to have dynamic lists in 3 (or more) listboxes - A, B and C.
according to selection in listbox A, the list of B is automatically updated (according to a specific range..)
so i have the procedure for that.
now i want to do the same thing for when selecting a value in listbox B with the values of listbox C.
so instead of having 2 similar procedure (for A anb B, and for B and C), I'd like to have only one with parameters.
two of the parameters are source-listbox and target-listbox, hence my query...
thanks!
Hello yonyon7,
Where are the ListBoxes located: on a worksheet, or UserForm? Where is the macro code located?
Sincerely,
Leith Ross
All listboxes are located in VBA userform, and the procedure is in the form code (ni each listbox click event).
Hello yonyon7,
The your new objects will be available only as long as the Click event is active. To make the objects persist while the UserForm is running, place the DIm statements in the General Declarations section (Very top) of the UserForm.
Sincerely,
Leith Ross
It works when variables are defined as variants instaed of listbox..
This one works:
While this one doesn't:![]()
Please Login or Register to view this content.
Thanks!![]()
Please Login or Register to view this content.
Yonyon
Hi Leith,
Declaration was initially at the very top, it didn't work. As mentioned, it only worked once declared as variant rather than ListBox.
Thanks,
Yonyon
Hello yonyon7,
Two other declaration methods should work also...
Sincerely,![]()
Please Login or Register to view this content.
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks