tree view + comboboxes

white_flag

Active Member
Joined
Mar 17, 2010
Messages
331
Hello

It is possible to make an treview with comboboxes in excel? via VBA. If Yes can be provide an example. thank you
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
What are you trying to do?

Isn't having comboboxes in a treeview sort of, I don't know how to describe it properly, 'defeating the purpose' of using the treeview?

I've seen it done but it wasn't in Excel/VBA, I think it was .NET or ASP - might even have been on a webpage.
 
Upvote 0
That was actually the site where I originally saw the idea I think, but it was a more recent article.

I don't think you'll be able to replicate that in VBA though, perhaps someone else knows better.:)

PS I still don't quite understand why that functionality would be needed.:eek:
 
Upvote 0
I like to made a sheet with 3 discipline:
1.uno
2.due
3.tre
those are the nodes then I have for eache nodes more options that will be repated
1.uno-----combo (data1)
|-----combo (data2)
|-----combo (data3)
|-----combo (data4)
2.due-----combo (data1)
|-----combo (data2)
|-----combo (data3)
|-----combo (data4)
etc..

and like this I can the user form smaller otherwise I had o make it via TAB controls.

It is understandable?
 
Upvote 0
Couldn't you just use a treeview for that?
 
Upvote 0
1.uno-----combo (data1)-50 entry
|-----combo (data2)-50 entry
|-----combo (data3)-etc
|-----combo (data4)-etc
2.due-----combo (data1)
|-----combo (data2)
|-----combo (data3)
|-----combo (data4)

because are too many data that it is why I like too use the combos. but I guess I will skip the treeview. because I did not find something to help me on internet
 
Upvote 0
I can see how comboboxes might work with a treeview in this situation but I don't think you'd be able to do it in VBA without some sort of 3rd party control.

Dependent comboboxes, if that's what you are thinking, probably would be a better idea.:)
 
Upvote 0
off the record:

I have this code in word:

Code:
Option Explicit
 
Private Sub UserForm_Initialize()
  With GetObject("D:\ooo.xls")
    ComboBox1.List = .sheets(1).usedrange.Value
    ComboBox2.List = .sheets(1).usedrange.Value
 
    .Close False
  End With
End Sub

it take an raw data from excel and populate an combo. it is possible to take specify column to specify combo?
ex:

ComboBox2.List = .sheets(1).range("A2:A100")
 
Upvote 0
Not 100% sure what you mean, you actually seem to be specifying the column, ie A, to populate the combobox with.

Do you have more than one column of data and you want column A in Combobox1, column B in Combobox2 etc?
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top