N
Norm Lundquist
This is a follow-up to a previous question about How to set a listbox "Top".
(It should have been HEIGHT!)
The following code is in the Initialize event of a user form:
ListBox1.Height = Count * 12 + 2
' For some reason, we must access the height.
MsgBox "ListBox1.Height from init = " & ListBox1.Height, vbInformation,
"List Box Height"
' t = ListBox1.Height
"Count" is the number of items that has been loaded into ListBox1. For some
reason, setting the height does not work unless it is accessed - like in the
"MsgBox" line. I tried setting t = ListBox1.Height, but that does not work.
The height of the listbox is either done correctly when the MsgBox statement
is used; OR it is set to 49.2.
Any ideas on what's happening???
THANK YOU!
(It should have been HEIGHT!)
The following code is in the Initialize event of a user form:
ListBox1.Height = Count * 12 + 2
' For some reason, we must access the height.
MsgBox "ListBox1.Height from init = " & ListBox1.Height, vbInformation,
"List Box Height"
' t = ListBox1.Height
"Count" is the number of items that has been loaded into ListBox1. For some
reason, setting the height does not work unless it is accessed - like in the
"MsgBox" line. I tried setting t = ListBox1.Height, but that does not work.
The height of the listbox is either done correctly when the MsgBox statement
is used; OR it is set to 49.2.
Any ideas on what's happening???
THANK YOU!