LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Listbox Height Question

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!
 
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
Row Height question Eagle Excel Discussion (Misc queries) 3 December 2nd 08 08:31 PM
Cell Height question [email protected] Excel Discussion (Misc queries) 3 November 5th 07 05:26 PM
Row Height Question Dave Excel Discussion (Misc queries) 0 February 7th 07 02:06 AM
Row Height Question Dave Excel Discussion (Misc queries) 2 February 6th 07 01:36 AM
Wanted func to determine height of ListBox row count Excel Programming 2 May 24th 04 06:38 PM


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