ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Data present (https://www.excelbanter.com/excel-discussion-misc-queries/43870-data-present.html)

bach

Data present
 

Hi,

I need to copy all information either in a colum or in a range across
to another sheet or a combo box.

Example I have a colum populating a combo box so when data is added to
this will update the combo box. I get a combo box with a lot of blank
enteries, because I have selected the whole colomn.

Is there a way to check how many rows in that coloum have data in them
and update this to the combox???


Bach


--
bach
------------------------------------------------------------------------
bach's Profile: http://www.excelforum.com/member.php...o&userid=26134
View this thread: http://www.excelforum.com/showthread...hreadid=401881


Debra Dalgleish

You can use a dynamic range as the source for the combobox, and it will
automatically expand as you add entries to the list. There are
instructions he

http://www.contextures.com/xlNames01.html

bach wrote:
Hi,

I need to copy all information either in a colum or in a range across
to another sheet or a combo box.

Example I have a colum populating a combo box so when data is added to
this will update the combo box. I get a combo box with a lot of blank
enteries, because I have selected the whole colomn.

Is there a way to check how many rows in that coloum have data in them
and update this to the combox???


Bach




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


bach


Will that work if the sheet currently is blank, it only has data in it
when a macro is run ??


--
bach
------------------------------------------------------------------------
bach's Profile: http://www.excelforum.com/member.php...o&userid=26134
View this thread: http://www.excelforum.com/showthread...hreadid=401881


Debra Dalgleish

If the sheet is blank, there would be no items in the combobox list.

bach wrote:
Will that work if the sheet currently is blank, it only has data in it
when a macro is run ??




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


bach


The first instances of the sheet will be blank, the user then gets data
via a macro and from then on data is always present.

Or could it be done in VBA using the control drop-down list object.

Bach.


--
bach
------------------------------------------------------------------------
bach's Profile: http://www.excelforum.com/member.php...o&userid=26134
View this thread: http://www.excelforum.com/showthread...hreadid=401881


Debra Dalgleish

If you're using the combo box from the Control Toolbox, you could use an
event procedure to update the list. For example:

Private Sub Worksheet_Activate()
Me.ComboBox1.ListFillRange = _
ActiveWorkbook.Names("MyList").RefersToRange.Addre ss
End Sub

There's information about application events at Chip Pearson's site:
http://www.cpearson.com/excel/AppEvent.htm

bach wrote:
The first instances of the sheet will be blank, the user then gets data
via a macro and from then on data is always present.

Or could it be done in VBA using the control drop-down list object.

Bach.




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com