Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Listbox 2 takes the value of Listbox 1 | Excel Discussion (Misc queries) | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
Listbox B if LIstbox A equals | Excel Discussion (Misc queries) | |||
can't use scrollbars on large spreadsheet, they bounce back | Excel Worksheet Functions | |||
Scrollbars starting at the bottom of form | Excel Discussion (Misc queries) |