Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default How to make Scroll Bar work on a form

Hi all,

After set Scrollbars and KeepScrollbarVisible on my form, there are scroll
arrow in two end of the bar, but no scroll handler in the middle of the bar.
Actually, there is a textbox whose lenght is already over the form length.

Clara
--
thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to make Scroll Bar work on a form

I assume you want the user to be able to scroll the userform vertically:

In design mode in the VBE, the userform should be large enough hold all the
controls.

Use code like this in the Userform Initialize event:

Private Sub UserForm_Initialize()
UserForm1.ScrollBars = fmScrollBarsVertical
UserForm1.KeepScrollBarsVisible = fmScrollBarsNone

UserForm1.Height = UserForm1.Height / 2
UserForm1.ScrollHeight = 2 * UserForm1.Height
' UserForm1.ScrollWidth = 2 * UserForm1.Width


End Sub

--
Regards,
Tom Ogilvy


"clara" wrote:

Hi all,

After set Scrollbars and KeepScrollbarVisible on my form, there are scroll
arrow in two end of the bar, but no scroll handler in the middle of the bar.
Actually, there is a textbox whose lenght is already over the form length.

Clara
--
thank you so much for your help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default How to make Scroll Bar work on a form

Hi Tom,

Thank you very much! It works, but why cann't I do it in properties window
of a form.

Clara
thank you so much for your help


"Tom Ogilvy" wrote:

I assume you want the user to be able to scroll the userform vertically:

In design mode in the VBE, the userform should be large enough hold all the
controls.

Use code like this in the Userform Initialize event:

Private Sub UserForm_Initialize()
UserForm1.ScrollBars = fmScrollBarsVertical
UserForm1.KeepScrollBarsVisible = fmScrollBarsNone

UserForm1.Height = UserForm1.Height / 2
UserForm1.ScrollHeight = 2 * UserForm1.Height
' UserForm1.ScrollWidth = 2 * UserForm1.Width


End Sub

--
Regards,
Tom Ogilvy


"clara" wrote:

Hi all,

After set Scrollbars and KeepScrollbarVisible on my form, there are scroll
arrow in two end of the bar, but no scroll handler in the middle of the bar.
Actually, there is a textbox whose lenght is already over the form length.

Clara
--
thank you so much for your help

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
How do I make mouse scroll wheel work in excel Rae Excel Worksheet Functions 8 April 29th 23 07:42 PM
How do I make mouse scroll wheel work in excel Rae Setting up and Configuration of Excel 1 March 14th 09 04:04 PM
How do I make the scroll wheel not work on a worksheet? rcomer123 Excel Worksheet Functions 1 April 18th 08 04:24 PM
how can I make a form number change everytime the form is opened babydumplingspita Excel Worksheet Functions 1 October 10th 05 07:58 PM
MAKE WHEEL MOUSE WORK ON USER FORM FRAME WITH SCROLL BAR HELP!!!!! Kenjaro Excel Programming 0 February 8th 05 02:53 AM


All times are GMT +1. The time now is 09:48 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"