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.? |
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.? |
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.? |
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.? |
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.? |
All times are GMT +1. The time now is 06:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com