Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
scrollbar reslut makes another scrollbar to show | Excel Discussion (Misc queries) | |||
Userform Scrollbar | Excel Programming | |||
scrollbar on userform | Excel Programming | |||
Excel VBA - Userform Texbox/Scrollbar problem | Excel Programming | |||
Scrollbar settings in a UserForm | Excel Programming |