Working with a combobox
I am trying to write a macro that will process a range selected by the user. I kow how to get the adress/rows and columns of the selected range (thanks to you guys). I need to populate a combobox with the columns in text form in the selected range (as in Column B). The user will then select one of the columns from the combobox, and I need to know which that is (in number format: 2). How do you do that?
Thanks |
Working with a combobox
Combobox1.List = Selection
rows are selected from a combobox. Not columns. -- Regards, Tom Ogilvy "OkieViking" wrote in message ... I am trying to write a macro that will process a range selected by the user. I kow how to get the adress/rows and columns of the selected range (thanks to you guys). I need to populate a combobox with the columns in text form in the selected range (as in Column B). The user will then select one of the columns from the combobox, and I need to know which that is (in number format: 2). How do you do that? Thanks |
Working with a combobox
I am trying to re-create the sort userform in excel. I can't get the drop down menus that ask me what column to sort by.
"OkieViking" wrote: I am trying to write a macro that will process a range selected by the user. I kow how to get the adress/rows and columns of the selected range (thanks to you guys). I need to populate a combobox with the columns in text form in the selected range (as in Column B). The user will then select one of the columns from the combobox, and I need to know which that is (in number format: 2). How do you do that? Thanks |
Working with a combobox
Private Sub UserForm_Initialize()
With Worksheets("Data") Set rng = .Range(.Cells(1, 1), .Cells(1, 1).End(xlToRight)) End With ComboBox1.List = Application.Transpose(rng) Combobox2.List = Combobox1.List Combobox3.List = Combobox1.List End Sub As an example. -- Regards, Tom Ogilvy "OkieViking" wrote in message ... I am trying to re-create the sort userform in excel. I can't get the drop down menus that ask me what column to sort by. "OkieViking" wrote: I am trying to write a macro that will process a range selected by the user. I kow how to get the adress/rows and columns of the selected range (thanks to you guys). I need to populate a combobox with the columns in text form in the selected range (as in Column B). The user will then select one of the columns from the combobox, and I need to know which that is (in number format: 2). How do you do that? Thanks |
All times are GMT +1. The time now is 02:48 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com