Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do I update contents of activeX combobox?

Hi Folks,

I have an activeX combo box which is populated by the contents of a range
called "ClientList". That works fine, and includes all items in the range.

When I add a new line to ClientList and rename the range, the update is not
reflected in the combo box until the workbook is closed and then re-opened.

Is there a way to correctly repopulate the combo box with the new updated
ClientList without closing and opening the workbook?

Thanks in advance,

Paul Silverman
Melbourne Australia


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default How do I update contents of activeX combobox?

You need to get an event procedure (triggered by the
change in the range name) to reset the combobox
ListFillRange property. But I don't know of any event
triggered just by renaming a range. However, I found a
trick: create a formula somewhere that does some
calculation based on your ClientList range (I just filled
a cell with the formula "=MAX(ClientList)"). Now changing
the range name forces a recalc of the sheet; use the
Workbook_SheetCalculate event to reset the combobox:

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)

Sheets("Sheet1").ComboBox1.ListFillRange = "ClientList"

End Sub

This seems to work for me...

K Dales

-----Original Message-----
Hi Folks,

I have an activeX combo box which is populated by the

contents of a range
called "ClientList". That works fine, and includes all

items in the range.

When I add a new line to ClientList and rename the range,

the update is not
reflected in the combo box until the workbook is closed

and then re-opened.

Is there a way to correctly repopulate the combo box with

the new updated
ClientList without closing and opening the workbook?

Thanks in advance,

Paul Silverman
Melbourne Australia


.

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
Transpose technique not populating ListFillRange of ActiveX combobox JimC[_2_] Excel Discussion (Misc queries) 2 September 6th 08 01:07 PM
ActiveX combobox aqualibra Excel Worksheet Functions 1 August 24th 08 07:54 AM
ActiveX Combobox and LinkedCell aqualibra Excel Worksheet Functions 2 August 21st 08 08:36 PM
HELP PLEASE..Inserting combobox (ActiveX control) makes workbook c Inquiringmind Excel Discussion (Misc queries) 0 February 10th 07 11:01 AM
HELP : ComboBox (Forms), Activex or What ? MIKO Excel Programming 3 July 1st 04 11:03 PM


All times are GMT +1. The time now is 02:17 PM.

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"