Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Excel VB ListBox 'Height' Problem

Hi, I have some code in my Excel spreadsheet that pops up a listbox
when a certain cell is selected, the contents of that listbox are
pulled from a hidden sheet within the excel workbook. My problem is in
getting the last row of data visible in the list box, it is just
visible at the bottom of the listbox but the vertical scroll will not
scroll down any further, if I go into the code and adjust the 'height'
property then go back to the screadsheet and select the cell I can see
the last row of data ok, when I save the changes, close down excel &
re-open again the problem has re-occurred, here are the listbox
properties I am using:-

MidfieldersListBox.Visible = True
MidfieldersListBox.Left = 354
MidfieldersListBox.Width = 531
MidfieldersListBox.Height = 300
MidfieldersListBox.Top = 10

I seem to be able to get the last row of data visible by altering
either the width or height property but as described above it is lost
when I close/open the spreadsheet - is this a know issue and is there
a workaround.

thanks in advance, Mark.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Excel VB ListBox 'Height' Problem

There is indeed.. How ever it is not done easily. Have a look here and post
back with questions.

http://www.cpearson.com/excel/formcontrol.aspx

"tommo_blade" wrote:

Hi, I have some code in my Excel spreadsheet that pops up a listbox
when a certain cell is selected, the contents of that listbox are
pulled from a hidden sheet within the excel workbook. My problem is in
getting the last row of data visible in the list box, it is just
visible at the bottom of the listbox but the vertical scroll will not
scroll down any further, if I go into the code and adjust the 'height'
property then go back to the screadsheet and select the cell I can see
the last row of data ok, when I save the changes, close down excel &
re-open again the problem has re-occurred, here are the listbox
properties I am using:-

MidfieldersListBox.Visible = True
MidfieldersListBox.Left = 354
MidfieldersListBox.Width = 531
MidfieldersListBox.Height = 300
MidfieldersListBox.Top = 10

I seem to be able to get the last row of data visible by altering
either the width or height property but as described above it is lost
when I close/open the spreadsheet - is this a know issue and is there
a workaround.

thanks in advance, Mark.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Excel VB ListBox 'Height' Problem

Ok I understand a little about accessing windows objects but I am
struggling to visualise how this will work with my problem, what I
think you are saying is this:-

In my present solution the listbox's are hidden until certain cells
are selected, at this point the listbox becomes visible and in that
listbox are the contents of a 'hidden worksheet' with the last row in
the listbox not being visible.

For your suggestion, when the cell is selected instead of the listbox
being presented the windows userform will be called (which can be
tweaked to any size) and this will display the contents of the hidden
worksheet.

One Question: what is the exact problem with the listbox, I can alter
the 'height' property of the box and it displays the whole data ok, it
is only after I close the spreadsheet and re-open that the problem
occurrs.

cheers.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Excel VB ListBox 'Height' Problem

Your Right i did misunderstand the problem. Try not making the Listbox
visible until after you have adjusted the size properties.

"tommo_blade" wrote:

Ok I understand a little about accessing windows objects but I am
struggling to visualise how this will work with my problem, what I
think you are saying is this:-

In my present solution the listbox's are hidden until certain cells
are selected, at this point the listbox becomes visible and in that
listbox are the contents of a 'hidden worksheet' with the last row in
the listbox not being visible.

For your suggestion, when the cell is selected instead of the listbox
being presented the windows userform will be called (which can be
tweaked to any size) and this will display the contents of the hidden
worksheet.

One Question: what is the exact problem with the listbox, I can alter
the 'height' property of the box and it displays the whole data ok, it
is only after I close the spreadsheet and re-open that the problem
occurrs.

cheers.

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
Row height setting problem Machinist60[_2_] Excel Discussion (Misc queries) 4 July 8th 11 12:19 AM
UserForm ListBox Height ZipCurs Excel Programming 3 May 10th 07 07:21 PM
Listbox Height Question Norm Lundquist Excel Programming 6 May 9th 07 11:08 PM
Row height problem [email protected] Excel Discussion (Misc queries) 1 December 19th 06 04:43 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 09:59 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"