Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Excel 2007 ListBox missing last item

I can't figure out why the last item I add to a listbox is not showing up.

The scroll bar on the right is offset about 1/8" from the bottom, but when I
make it scroll down all of the way, it pops back up - refusing to show the
last item (which I presume is there, but hidden)

I have a total of about 30 items with the ListStyle set to
1-fmListStyleOption, and MultiSelect set to 1-fmMultiSelectMulti.

I've tried populating it with an array and by using .AddItem in a FOR-NEXT
loop.
Debug.Print for the last array item shows it correctly in the Immediate
Window, so I know the value for the last item is not missing from the array
(arProductGroups)

----------------------------------------------------------------------------------
The ARRAY Method:

With .listProdGroups
.List = Application.Transpose(arProductGroups)
End With

----------------------------------------------------------------------------------
FOR-NEXT method:

With .listProdGroups
For i = 1 To UBound(arProductGroups, 2)
.AddItem arProductGroups(0, i)
Next
End With
----------------------------------------------------------------------------------

I don't recal having this problem before I converted the workbook from Excel
2003 to Excel 2007.

Anyone else seen this behavior?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Excel 2007 ListBox missing last item


"Anyone else seen this behavior?"

Yes, but it wasn't in the 2007 version.
You will have to change (increase/decrease) the height and or
toggle the IntegralHeight setting for the listbox until the problem goes away.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"dsimcox"
wrote in message
I can't figure out why the last item I add to a listbox is not showing up.

The scroll bar on the right is offset about 1/8" from the bottom, but when I
make it scroll down all of the way, it pops back up - refusing to show the
last item (which I presume is there, but hidden)

I have a total of about 30 items with the ListStyle set to
1-fmListStyleOption, and MultiSelect set to 1-fmMultiSelectMulti.

I've tried populating it with an array and by using .AddItem in a FOR-NEXT
loop.
Debug.Print for the last array item shows it correctly in the Immediate
Window, so I know the value for the last item is not missing from the array
(arProductGroups)
-snip-
I don't recal having this problem before I converted the workbook from Excel
2003 to Excel 2007.
Anyone else seen this behavior?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Excel 2007 ListBox missing last item

Thanks, Jim . . . your suggestion solved my problem. I can see that the
listbox needs space for an "integral number" of list items - and by reducing
the list box it allowed the items to display correctly with a scroll bar.

Sorry to blame 2007 - it's the first thing that comes to mind when I have a
problem these days.

Appreciate your very helpful response yesterday.

"Jim Cone" wrote:


"Anyone else seen this behavior?"

Yes, but it wasn't in the 2007 version.
You will have to change (increase/decrease) the height and or
toggle the IntegralHeight setting for the listbox until the problem goes away.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"dsimcox"
wrote in message
I can't figure out why the last item I add to a listbox is not showing up.

The scroll bar on the right is offset about 1/8" from the bottom, but when I
make it scroll down all of the way, it pops back up - refusing to show the
last item (which I presume is there, but hidden)

I have a total of about 30 items with the ListStyle set to
1-fmListStyleOption, and MultiSelect set to 1-fmMultiSelectMulti.

I've tried populating it with an array and by using .AddItem in a FOR-NEXT
loop.
Debug.Print for the last array item shows it correctly in the Immediate
Window, so I know the value for the last item is not missing from the array
(arProductGroups)
-snip-
I don't recal having this problem before I converted the workbook from Excel
2003 to Excel 2007.
Anyone else seen this behavior?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2007 ListBox missing last item

I'm seeing the same behavior, but I'm using Excel 2003, not 2007.

Do you happen to be running Windows Vista? I am, and that's when I started seeing this problem.
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
Remove Item from Listbox by Item Name Randy[_2_] Excel Programming 3 September 19th 07 02:36 PM
Double click item in Listbox to select item and close Listbox GusEvans Excel Programming 3 July 19th 07 12:36 PM
listbox add item Baha Excel Programming 0 December 8th 06 02:37 AM
Last item in listbox not getting displayed.- - Excel VBA appln. Nazhat Aysha Excel Programming 1 October 19th 05 12:53 PM
The value of a ListBox Item TK Excel Programming 2 August 20th 04 06:17 AM


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