Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Userform scrollbar nightmare!

Hi all,

Having battled the comboboxes i'm now stuck with my scroll bars on my
user form.

I've created a large user form with about 180 controls. It's approx
2500 high so i need a vertical scroll bar. When i set scrollbars to
visible in the properties of the user form the vertical scroll bar
shows but has no bar to scroll up or down with.

I've also tried statements like the below in the initialise event
code;

July08.ScrollBars = fmScrollBarsVertical
July08.Scroll fmScrollActionBegin
July08.ScrollBars = 2
July08.ScrollHeight = 350

But no avail. I've searched and not found any other solutions on here
so I'd love some help. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Userform scrollbar nightmare!

I'm guessing, but try this:

July08.ScrollBart1.ScrollHeight = 350



"anon" wrote:

Hi all,

Having battled the comboboxes i'm now stuck with my scroll bars on my
user form.

I've created a large user form with about 180 controls. It's approx
2500 high so i need a vertical scroll bar. When i set scrollbars to
visible in the properties of the user form the vertical scroll bar
shows but has no bar to scroll up or down with.

I've also tried statements like the below in the initialise event
code;

July08.ScrollBars = fmScrollBarsVertical
July08.Scroll fmScrollActionBegin
July08.ScrollBars = 2
July08.ScrollHeight = 350

But no avail. I've searched and not found any other solutions on here
so I'd love some help. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Userform scrollbar nightmare!

Without the typo:

July08.ScrollBar1.ScrollHeight = 350



"JLGWhiz" wrote:

I'm guessing, but try this:

July08.ScrollBart1.ScrollHeight = 350



"anon" wrote:

Hi all,

Having battled the comboboxes i'm now stuck with my scroll bars on my
user form.

I've created a large user form with about 180 controls. It's approx
2500 high so i need a vertical scroll bar. When i set scrollbars to
visible in the properties of the user form the vertical scroll bar
shows but has no bar to scroll up or down with.

I've also tried statements like the below in the initialise event
code;

July08.ScrollBars = fmScrollBarsVertical
July08.Scroll fmScrollActionBegin
July08.ScrollBars = 2
July08.ScrollHeight = 350

But no avail. I've searched and not found any other solutions on here
so I'd love some help. Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Userform scrollbar nightmare!


I get the error 'method or data member not found' on the line you
suggested. I presume because I haven't created a scroll bar 1 - i'm
not sure how to do this via code.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Userform scrollbar nightmare!

OK i've figured;

With Me
Label1.Move ((.InsideWidth - Label1.Width) / 2),
((.InsideHeight - Label1.Height) / 2)
.ScrollBars = fmScrollBarsBoth
.ScrollHeight = 3000
.ScrollWidth = 1200
.ScrollTop = 0
End With

However my problem is now that the form doesn't fit to the page, but
disappears off the bottom of the page - any suggestions (i thought
making it modal would work but no luck)


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Userform scrollbar nightmare!

The Height is measured in pixels. If you reduce the height from 3000 to 500
it might work better. You could also look at the Max/Min properties to see
if they could be applied in this case.

"anon" wrote:

OK i've figured;

With Me
Label1.Move ((.InsideWidth - Label1.Width) / 2),
((.InsideHeight - Label1.Height) / 2)
.ScrollBars = fmScrollBarsBoth
.ScrollHeight = 3000
.ScrollWidth = 1200
.ScrollTop = 0
End With

However my problem is now that the form doesn't fit to the page, but
disappears off the bottom of the page - any suggestions (i thought
making it modal would work but no luck)

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
scrollbar reslut makes another scrollbar to show Patrik Excel Discussion (Misc queries) 0 April 18th 05 03:11 PM
Userform Scrollbar Stuart[_21_] Excel Programming 4 March 22nd 05 10:10 PM
scrollbar on userform S.Hoitinga Excel Programming 7 April 5th 04 10:06 PM
Excel VBA - Userform Texbox/Scrollbar problem thesteelmaker[_5_] Excel Programming 2 March 6th 04 09:09 PM
Scrollbar settings in a UserForm mohsinb[_5_] Excel Programming 2 November 9th 03 06:04 PM


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