Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Create Combobox Visual Basic

Hi!

I have a problem with Comboboxes. I need to add combobox to some cells in
excel. And there would have to be some options to select. So to create a
combobox and add options I´m doing this.

Private Sub ComboBox1_Change()
ComboBox1.AddItem "A"
ComboBox1.AddItem "B"
ComboBox1.AddItem "C"
End Sub


The problem is that the options will be added each time I click om the
combomeny. So does any one know how to create a combobox and add a list of
options with Visual Basic code.
I also need to refer a cell to a combobox so it is just allowed to change
the option in that specifed cell and so the combo box should not move from
the cell if someone would try.

Thanx
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Create Combobox Visual Basic

You could just clear it each time, a bit simpler than building on the fly.

Combobocx1.Clear

--
HTH

Bob Phillips

"Amoni" wrote in message
...
Hi!

I have a problem with Comboboxes. I need to add combobox to some cells in
excel. And there would have to be some options to select. So to create a
combobox and add options I´m doing this.

Private Sub ComboBox1_Change()
ComboBox1.AddItem "A"
ComboBox1.AddItem "B"
ComboBox1.AddItem "C"
End Sub


The problem is that the options will be added each time I click om the
combomeny. So does any one know how to create a combobox and add a list of
options with Visual Basic code.
I also need to refer a cell to a combobox so it is just allowed to change
the option in that specifed cell and so the combo box should not move from
the cell if someone would try.

Thanx



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
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Create and Use Button Menu using visual Basic in Excel Walter L. skinner Excel Discussion (Misc queries) 3 November 17th 05 11:40 AM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Excel Visual Basic - need help to create a loop of filenames dgates12 Excel Programming 3 May 12th 05 01:22 PM
Visual Basic: Combobox Complications Charlie[_4_] Excel Programming 2 August 8th 03 09:24 PM


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