Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Populating combobox from another combobox

Hello
I've created, with help, a combobox that lists the sheets in a workbook. I
now want a second combobox to be populated from the contents of a specific
range from the sheet chosen in combobox 1. ie

combobox1 = company names (held in sheet)

combobox2 = above company - employee names held in range(A2:A30)

Again any help is greatly appreciated.

Thanks
David



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Populating combobox from another combobox

use the click event of the first combobox

Private Sub Combobox1_Click()
Dim sName as String
if Combobox1.ListIndex < -1 then
sName = Combobox1.Value
Combobox2.RowSource = sName & "!A2:A30"
End if
End sub

--
Regards,
Tom Ogilvy

"David Goodall" wrote in message
...
Hello
I've created, with help, a combobox that lists the sheets in a workbook. I
now want a second combobox to be populated from the contents of a specific
range from the sheet chosen in combobox 1. ie

combobox1 = company names (held in sheet)

combobox2 = above company - employee names held in range(A2:A30)

Again any help is greatly appreciated.

Thanks
David





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
Populating combobox/listbox Torstein S. Johnsen[_2_] Excel Programming 1 May 13th 04 09:26 AM
Populating ComboBox Methods Todd Huttenstine[_2_] Excel Programming 8 January 19th 04 12:14 AM
Populating Combobox Methods Todd Huttenstine[_2_] Excel Programming 10 January 18th 04 10:19 PM
Populating sheet names in combobox Todd Huttenstine[_2_] Excel Programming 3 December 21st 03 12:11 AM
populating a combobox on a worksheet Tim Marsh[_2_] Excel Programming 2 November 3rd 03 12:44 PM


All times are GMT +1. The time now is 06:29 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"