Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Issue with listbox not showing the last value in the range
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Issue with listbox not showing the last value in the range
I tried adjusting the height and the textalign property...neither worked.
The scroll bar literally shows that theres a little space left, implying there's another record, it just won't let me scroll down. -- Robert "JLGWhiz" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
listbox issue | Excel Programming | |||
showing a listbox with last entry as the default | Excel Programming | |||
Showing Zero for all blank cells in a range | Excel Discussion (Misc queries) | |||
UserForm Listbox issue | Excel Discussion (Misc queries) | |||
Showing Worksheet Range in Userform | Excel Programming |