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

Hi :)
I have a sheet who's contain a button and a combobox. I'd like to fill
the combobox when the button is pressed. Who can I do ?

Thanks for your help


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Fill a combobox

If they are form controls, create a macro with this code

ActiveSheet.Shapes("Drop Down 1").ListFillRange = "h9:h13"

and assign to the button.

If its control tollbox controls, add this code to the button click event

Private Sub CommandButton1_Click()
With Combobox1
.ListFillRange="H9:H13"
.ListIndex = 0
End WIth
End Sub

where H9:H13 bis a range holding the data to populate the control.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"karibou " wrote in message
...
Hi :)
I have a sheet who's contain a button and a combobox. I'd like to fill
the combobox when the button is pressed. Who can I do ?

Thanks for your help


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fill a combobox

Thanks very much for your help !!!!

Bob Phillips wrote:
*If they are form controls, create a macro with this code

ActiveSheet.Shapes("Drop Down 1").ListFillRange = "h9:h13"

and assign to the button.

If its control tollbox controls, add this code to the button click
event

Private Sub CommandButton1_Click()
With Combobox1
.ListFillRange="H9:H13"
.ListIndex = 0
End WIth
End Sub

where H9:H13 bis a range holding the data to populate the control.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"karibou " wrote in message
...
Hi :)
I have a sheet who's contain a button and a combobox. I'd like to

fill
the combobox when the button is pressed. Who can I do ?

Thanks for your help


---
Message posted from http://www.ExcelForum.com/
*



---
Message posted from http://www.ExcelForum.com/

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
Fill a Combobox from a ROW? Rob[_5_] Excel Discussion (Misc queries) 4 January 15th 09 08:12 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Fill in form to type Item descrictions and costs and fill in funct cradino Excel Worksheet Functions 0 July 16th 06 08:44 PM
I have a list of data, fill in the gaps. FILL function won't work Triv Excel Discussion (Misc queries) 1 September 17th 05 02:33 PM
ComboBox List Fill Range Dan Excel Programming 3 December 3rd 03 04:56 PM


All times are GMT +1. The time now is 11:08 AM.

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"