Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Items To a combo Box


Hi everybody,

I have a form in VBA containing a ComboBox what I want is adding
items to that ComboBox .. The Items is a list availble in range
(A1:A50).

Can you please help me in that case.

Thank you soooo much,


--
LoveCandle
------------------------------------------------------------------------
LoveCandle's Profile: http://www.excelforum.com/member.php...o&userid=28612
View this thread: http://www.excelforum.com/showthread...hreadid=530403

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Adding Items To a combo Box

Set the RowSource property to A1:A50

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"LoveCandle" wrote
in message ...

Hi everybody,

I have a form in VBA containing a ComboBox what I want is adding
items to that ComboBox .. The Items is a list availble in range
(A1:A50).

Can you please help me in that case.

Thank you soooo much,


--
LoveCandle
------------------------------------------------------------------------
LoveCandle's Profile:

http://www.excelforum.com/member.php...o&userid=28612
View this thread: http://www.excelforum.com/showthread...hreadid=530403



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Items To a combo Box


Thank you som much Mr. Bob,,

But at the end of that range there are some blank cells which are
waiting to be filled in the future .. and I don't want blank cells to
appear in the ComboBox I want only filled cells to appear..

Is there any way for that???


--
LoveCandle
------------------------------------------------------------------------
LoveCandle's Profile: http://www.excelforum.com/member.php...o&userid=28612
View this thread: http://www.excelforum.com/showthread...hreadid=530403

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Adding Items To a combo Box

You will have to either

- create a list in the worksheet with no blanks using formulae

- go through the list and only AddItem the non-blank entries.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"LoveCandle" wrote
in message ...

Thank you som much Mr. Bob,,

But at the end of that range there are some blank cells which are
waiting to be filled in the future .. and I don't want blank cells to
appear in the ComboBox I want only filled cells to appear..

Is there any way for that???


--
LoveCandle
------------------------------------------------------------------------
LoveCandle's Profile:

http://www.excelforum.com/member.php...o&userid=28612
View this thread: http://www.excelforum.com/showthread...hreadid=530403



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Items To a combo Box


Hi Mr. Bob

After posting my question about the way to get the cells that have data
only in the ComboBox I remembered one way I have used before with the
List feature in Validation property I tried the same way with
ComboBox and it worked perfectly.

My way is using the following formula in the SourceRow instead of the
normal source (A1:A50), and it will give us the cells that have data
only.

A1:INDIRECT(ADDRESS(COUNTIF(A1:A50,"<0"),1))

* The second part of the previous formula give us the address of the
last cell that is not blank.

Remarks: if the list is not in the first column and not starting from
the first row, we can adjust it to be like the following one:

P9:INDIRECT(ADDRESS(COUNTIF(P9:P108,"<0")+8,16))

I hope that everybody benefits from this,

bye,


--
LoveCandle
------------------------------------------------------------------------
LoveCandle's Profile: http://www.excelforum.com/member.php...o&userid=28612
View this thread: http://www.excelforum.com/showthread...hreadid=530403



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
Adding items to a combo box on a user form Gazz_85[_2_] Excel Discussion (Misc queries) 1 July 9th 09 05:00 PM
View List Items in Combo Box rl Excel Worksheet Functions 6 May 17th 07 12:53 AM
add items to combo box beauty_bobaloo Excel Programming 4 March 17th 06 09:24 AM
Adding Items to a ListBox-Unique Items Only jpendegraft[_14_] Excel Programming 2 May 2nd 04 02:27 AM
Different colors for combo items Malcolm Excel Programming 1 November 6th 03 12:26 PM


All times are GMT +1. The time now is 05:36 PM.

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

About Us

"It's about Microsoft Excel"