View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Issue with listbox not showing the last value in the range

You can adust the height property for the listbox which might help. Also,
might try the text align property.

"robs3131" wrote:

Hi all,

This one is leaving laughing in utter frustration and delirium (have been
spending a LOT of time lately in VBA trying to finish my project... :)

The issue is that the last value in my range that is being pulled into a
listbox in a form is not showing in the listbox. I can see just the very
very top of the text of the last value in the listbox, however, for some
reason, the listbox will not scroll down to that last value. It's very odd
-- the scroller on the listbox shows just a tad of space between the current
position and the end, but it won't let me scroll to the end.

I have increased my range to include a blank cell -- this allows the last
value to show -- however, I'm wondering why the heck this is happening.
Thanks! Code is below:

Formula in sheet for specified range (under "Insert" - "Name" -- note that
this is the formula which results in the last cell in the range not showing
in the listbox):
=OFFSET('Commdet formulas'!$BA$1,0,0,COUNTA('Commdet formulas'!$BA:$BA),1)
---------
Code of form initialization:
Private Sub UserForm_Initialize()

'Sheets("Commdet formulas").Activate
With lstmissingids
'populate listbox with appropriate values
.RowSource = Range("txtmissing").Address
End With

End Sub
-------
Code of formatting of form:
With frmmissingent
.Show vbModeless
.Caption = "Open Sales transactions"
.lstmissingids.Top = 198
.lstmissingids.Height = 100.5
.cmdcopylbl.Top = 312
.cmdcopy.Top = 312
.cmdclose.Top = 312
.lblmissingent.Height = 180
.Height = 380
End With


--
Robert