Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
sri sri is offline
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
sri sri is offline
external usenet poster
 
Posts: 37
Default 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
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
Listbox 2 takes the value of Listbox 1 Illya Teideman Excel Discussion (Misc queries) 3 April 10th 07 03:20 PM
listbox B conditional of input in Listbox A Kim K Excel Discussion (Misc queries) 1 October 31st 06 08:27 PM
Listbox B if LIstbox A equals Kim K Excel Discussion (Misc queries) 2 October 31st 06 07:03 PM
can't use scrollbars on large spreadsheet, they bounce back Hayden Lee Excel Worksheet Functions 6 August 29th 06 07:50 PM
Scrollbars starting at the bottom of form cparsons Excel Discussion (Misc queries) 0 July 31st 05 01:54 AM


All times are GMT +1. The time now is 08:59 PM.

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"