Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Listbox In VBA Growing

I have a listbox in a VBA script which grows both in width and height
after each save and re-open of the script. The height and width values
on the properties of the box change automatically. Is there any way of
stopping this.?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Listbox In VBA Growing

Alok

Thanks for your idea. I think this would work for me also, however I
am fairly new to VBA and I've tried setting the height and width during
a record macro, to get the values but this was no help as I had to go
into the design tool to do it, and the recorder doesn't seem to work in
the design mode.

Could you let me have the syntax for setting the height and width for
your list box.

Alok wrote:
Yes this is a problem. In my case the Listbox kept shrinking and finally
became a text box. I did not research this issue much and handled the problem
by fixing the Height and Width properties of the Listbox in the Workbook open
event.

Alok

" wrote:

I have a listbox in a VBA script which grows both in width and height
after each save and re-open of the script. The height and width values
on the properties of the box change automatically. Is there any way of
stopping this.?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Listbox In VBA Growing

Alok

Thanks for your idea. I think this would work for me also, however I
am fairly new to VBA and I've tried setting the height and width during
a record macro, to get the values but this was no help as I had to go
into the design tool to do it, and the recorder doesn't seem to work in
the design mode.

Could you let me have the syntax for setting the height and width for
your list box.

Alok wrote:
Yes this is a problem. In my case the Listbox kept shrinking and finally
became a text box. I did not research this issue much and handled the problem
by fixing the Height and Width properties of the Listbox in the Workbook open
event.

Alok

" wrote:

I have a listbox in a VBA script which grows both in width and height
after each save and re-open of the script. The height and width values
on the properties of the box change automatically. Is there any way of
stopping this.?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Listbox In VBA Growing

Alok

Thanks for your idea. I think this would work for me also, however I
am fairly new to VBA and I've tried setting the height and width during
a record macro, to get the values but this was no help as I had to go
into the design tool to do it, and the recorder doesn't seem to work in
the design mode.

Could you let me have the syntax for setting the height and width for
your list box.

Alok wrote:
Yes this is a problem. In my case the Listbox kept shrinking and finally
became a text box. I did not research this issue much and handled the problem
by fixing the Height and Width properties of the Listbox in the Workbook open
event.

Alok

" wrote:

I have a listbox in a VBA script which grows both in width and height
after each save and re-open of the script. The height and width values
on the properties of the box change automatically. Is there any way of
stopping this.?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Listbox In VBA Growing

Thanks Alok,

Works a treat, much appreciated.
Alok wrote:
In the Visual Basic IDE find out the programmatic name of the worksheet on
which your list box is located. Say it is Sheet2. Also say that your list box
is ListBox1.

With Sheet2.ListBox2
.Height= ...
.Width =...
End with

Alok
" wrote:

Alok

Thanks for your idea. I think this would work for me also, however I
am fairly new to VBA and I've tried setting the height and width during
a record macro, to get the values but this was no help as I had to go
into the design tool to do it, and the recorder doesn't seem to work in
the design mode.

Could you let me have the syntax for setting the height and width for
your list box.

Alok wrote:
Yes this is a problem. In my case the Listbox kept shrinking and finally
became a text box. I did not research this issue much and handled the problem
by fixing the Height and Width properties of the Listbox in the Workbook open
event.

Alok

" wrote:

I have a listbox in a VBA script which grows both in width and height
after each save and re-open of the script. The height and width values
on the properties of the box change automatically. Is there any way of
stopping this.?





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
File size growing growing exponentially Steve Excel Discussion (Misc queries) 3 May 24th 09 06:29 PM
Growing filesize without doing anything Mike Excel Discussion (Misc queries) 0 June 21st 07 09:56 AM
Listbox In VBA Growing [email protected] Excel Programming 0 December 20th 06 11:21 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Growing CF Problem David McRitchie[_2_] Excel Programming 0 September 29th 03 05:04 PM


All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"