here is my code to initialize the form:
what am i doing wrong?![]()
Please Login or Register to view this content.
here is my code to initialize the form:
what am i doing wrong?![]()
Please Login or Register to view this content.
Is scope of named range set to workbook or worksheet?
If former, try just using Rane("Names") instead of ws.Range("Names")
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
― Robert A. Heinlein
thanks CK, but i changed this one line and it's working now.
i added the ThisWorkbook to the set statement.![]()
Please Login or Register to view this content.
Glad you got it solved. I actually ran some tests and scope had no impact when it's set to workbook.
I guess, you had another workbook active when the code ran.
one quick question, im trying to create a combobox that lists two ranges, the first one is named Hours and the second is offset to that. so why isn't this working?
![]()
Please Login or Register to view this content.
What's the end result you are trying to achieve?
Should both be loaded to same combobox and selected as one?
If so do something like.
Or are you trying to do something different?![]()
Please Login or Register to view this content.
ok so that shows the combobox with both columns of text, but when i pick something off the list, then it only returns the first column in the combobox. see snapshot. how do i fix that?
combobox1.png
That's expected behavior of Combobox. Combobox can only display value of first visible column.
I've experimented with it before. But there really isn't direct way to show both columns.
One method is to use caption or text box above combo box to show both.
Another is to have 3rd column added to range concatenating 1 & 2.
Then setting column width of 1st and 2nd to 0. Hence, showing 3rd column only.
Or use _Change event to change ColumnWidth.![]()
Please Login or Register to view this content.
Or just use listbox instead of Combobox.![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks