Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate working days but change working week SamB Excel Discussion (Misc queries) 1 September 1st 08 09:17 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
combobox not working tina Excel Worksheet Functions 1 November 10th 05 12:05 PM
ComboBox programming not working DontKnowWhatImDoing Excel Programming 2 April 15th 04 02:43 PM
Adding sales from a non working day to the previous working day Alex Excel Programming 1 September 19th 03 08:48 AM


All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"