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

Hello,

I am developing an Excel-Sheet in order to compare easily vehicle
dimensions.

I first defined an array by selecting the range (i.e. A3:B60) and
naming it (i.e. List1). Then, in a separate Worksheet, I inserted a
ComboBox and entered "List1" as ListFillRange. I specified the
following properties as well:

BoundColumn = 1
ColumnCount = 2

So far, so good. I can select any row of the array "List1" through
the ComboBox.

Then, I need to insert a row within the array "List1". I simply
select a row and choose "insert cells". The range of the array is
automatically updated (i.e. A3:B61). And I can select the inserted row
with the ComboBox. So far, so good!

The problem is that the ComboBox does not display the new last row of
the array (B61). Somehow, the display needs to be updated. Saving the
document doesn't help.

I first need to close the document and open it again, such that the
ComboBox displays the entire range of the array "List1" (B3 to
B61). Does anybody know how this update can occur without having to
close the Excel-Sheet first?

Excel is doing something specific when opening a document, something
which updates everything. Maybe I just need to simulate this update via
a macro.... Does anybody know how to do that?

I would really appreciate any help. Thanks a lot!

Guillaume

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default ComboBox Update

In the view code for your ComboBox use this to update the list whenever the
ComboBox gets focus.

Private Sub ComboBox1_GotFocus()
Me.ComboBox1.ListFillRange = "List1"
End Sub

Mike F
wrote in message
oups.com...
Hello,

I am developing an Excel-Sheet in order to compare easily vehicle
dimensions.

I first defined an array by selecting the range (i.e. A3:B60) and
naming it (i.e. List1). Then, in a separate Worksheet, I inserted a
ComboBox and entered "List1" as ListFillRange. I specified the
following properties as well:

BoundColumn = 1
ColumnCount = 2

So far, so good. I can select any row of the array "List1" through
the ComboBox.

Then, I need to insert a row within the array "List1". I simply
select a row and choose "insert cells". The range of the array is
automatically updated (i.e. A3:B61). And I can select the inserted row
with the ComboBox. So far, so good!

The problem is that the ComboBox does not display the new last row of
the array (B61). Somehow, the display needs to be updated. Saving the
document doesn't help.

I first need to close the document and open it again, such that the
ComboBox displays the entire range of the array "List1" (B3 to
B61). Does anybody know how this update can occur without having to
close the Excel-Sheet first?

Excel is doing something specific when opening a document, something
which updates everything. Maybe I just need to simulate this update via
a macro.... Does anybody know how to do that?

I would really appreciate any help. Thanks a lot!

Guillaume



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

It works !!!
Thank you so much!

Guillaume

Mike Fogleman schrieb:

In the view code for your ComboBox use this to update the list whenever the
ComboBox gets focus.

Private Sub ComboBox1_GotFocus()
Me.ComboBox1.ListFillRange = "List1"
End Sub

Mike F
wrote in message
oups.com...
Hello,

I am developing an Excel-Sheet in order to compare easily vehicle
dimensions.

I first defined an array by selecting the range (i.e. A3:B60) and
naming it (i.e. List1). Then, in a separate Worksheet, I inserted a
ComboBox and entered "List1" as ListFillRange. I specified the
following properties as well:

BoundColumn = 1
ColumnCount = 2

So far, so good. I can select any row of the array "List1" through
the ComboBox.

Then, I need to insert a row within the array "List1". I simply
select a row and choose "insert cells". The range of the array is
automatically updated (i.e. A3:B61). And I can select the inserted row
with the ComboBox. So far, so good!

The problem is that the ComboBox does not display the new last row of
the array (B61). Somehow, the display needs to be updated. Saving the
document doesn't help.

I first need to close the document and open it again, such that the
ComboBox displays the entire range of the array "List1" (B3 to
B61). Does anybody know how this update can occur without having to
close the Excel-Sheet first?

Excel is doing something specific when opening a document, something
which updates everything. Maybe I just need to simulate this update via
a macro.... Does anybody know how to do that?

I would really appreciate any help. Thanks a lot!

Guillaume


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
Update combobox Aaron Excel Programming 1 April 4th 06 02:48 AM
combobox update Alex Excel Programming 2 September 14th 05 05:25 PM
Cut/Copy Combobox - I can't update MBais Excel Programming 2 July 22nd 05 02:26 PM
combobox update Josh[_9_] Excel Programming 2 February 24th 04 05:22 PM
Combobox update Robert Couchman[_4_] Excel Programming 0 February 20th 04 09:13 AM


All times are GMT +1. The time now is 12:09 AM.

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"