![]() |
Scrollbars in Listbox
Hello All,
Is there any way to disable horizontal scroll bar in Listbox in VBA form. I am just adding A-Z to that listbox with checkbox option, but horizontal scroll bar is attached to it automatically. When i adjust the width, it goes off, but i don't want to do this, as it will spoil my design. I checked the properties and the methods, there is no mention of scrollbar anywhere. Any help would be highly appreciated. Thanks -- Regards Sri |
Scrollbars in Listbox
If you play with the .width and .columnwidth, maybe you can get it to work the
way you want. This worked for me: Option Explicit Private Sub UserForm_Initialize() Dim iCtr As Long With Me.ListBox1 .ListStyle = fmListStyleOption .Width = 55 .ColumnWidths = 35 For iCtr = Asc("A") To Asc("Z") .AddItem Chr(iCtr) Next iCtr End With End Sub Sri wrote: Hello All, Is there any way to disable horizontal scroll bar in Listbox in VBA form. I am just adding A-Z to that listbox with checkbox option, but horizontal scroll bar is attached to it automatically. When i adjust the width, it goes off, but i don't want to do this, as it will spoil my design. I checked the properties and the methods, there is no mention of scrollbar anywhere. Any help would be highly appreciated. Thanks -- Regards Sri -- Dave Peterson |
Scrollbars in Listbox
Thanks Dave. I can aleast play with the Columnwidth to adjust the size.
-- Regards Sri "Dave Peterson" wrote: If you play with the .width and .columnwidth, maybe you can get it to work the way you want. This worked for me: Option Explicit Private Sub UserForm_Initialize() Dim iCtr As Long With Me.ListBox1 .ListStyle = fmListStyleOption .Width = 55 .ColumnWidths = 35 For iCtr = Asc("A") To Asc("Z") .AddItem Chr(iCtr) Next iCtr End With End Sub Sri wrote: Hello All, Is there any way to disable horizontal scroll bar in Listbox in VBA form. I am just adding A-Z to that listbox with checkbox option, but horizontal scroll bar is attached to it automatically. When i adjust the width, it goes off, but i don't want to do this, as it will spoil my design. I checked the properties and the methods, there is no mention of scrollbar anywhere. Any help would be highly appreciated. Thanks -- Regards Sri -- Dave Peterson |
All times are GMT +1. The time now is 02:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com