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


"Soniya" wrote in message
...
Hi All,

How can I have AB,AC,AD as combo box items without usig
row source?

TIA
Soniya


By explicitly adding them to the combobox from VBA

On a sheet

With ActiveSheet.OLEObjects("ComboBox1").Object
.AddItem "ab"
.AddItem "ac"
.AddItem "ad"
End With

on a userform

With ComboBox1.Object
.AddItem "ab"
.AddItem "bc"
.AddItem "cd"
End With

Keith


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default ComboBox items

Sorry..

i want to have onle these three items in the combo box
lists...
not add any..

how i can define it without a row source?

TIA
Soniya
-----Original Message-----

"Soniya" wrote in message
...
Hi All,

How can I have AB,AC,AD as combo box items without usig
row source?

TIA
Soniya


By explicitly adding them to the combobox from VBA

On a sheet

With ActiveSheet.OLEObjects("ComboBox1").Object
.AddItem "ab"
.AddItem "ac"
.AddItem "ad"
End With

on a userform

With ComboBox1.Object
.AddItem "ab"
.AddItem "bc"
.AddItem "cd"
End With

Keith


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default ComboBox items


"Soniya" wrote in message
...
Sorry..

i want to have onle these three items in the combo box
lists...


I understood that.

not add any..


Add is the method you use to put an item
in the combobox. To clear it first use

CombBox1.clear

e.g.

With ActiveSheet.OLEObjects("ComboBox1").Object
.Clear
.AddItem "ab"
.AddItem "ac"
.AddItem "ad"
End With


how i can define it without a row source?


See Above

Keith


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 combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
SUMPRODUCT to count items with duplicates where another column contains two defined items PCLIVE Excel Worksheet Functions 4 September 8th 07 10:33 AM
Access items stored in combobox Geoff Excel Discussion (Misc queries) 1 September 5th 07 01:58 AM
formatting the list items for ComboBox created using Forms Desmond Excel Discussion (Misc queries) 3 May 4th 06 10:04 AM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM


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