Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll Bars in UserForms
I've a userform that sometimes extends beyond the edge of the screen, so
i'd like to put a vertical scroll bar in to view the whole thing. I've tried google, but the closest i got was a page in german, which i don't speak. Can anyone explain or direct me to a webpage that can tell me how to put a scroll bar into a large userform to scroll to the bottom and top. I'm not sure if it matters, but the userforms size is variable based on the number of rows matching particular criteria. I can't imagine it will, but just thought i would mention it just in case it effects it. Thanks James --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll Bars in UserForms
Hi James
Put a Frame1 on a new userform. Put a Frame2 inside Frame1. Put whatever onto Frame2 just to watch. Insert a vertical Scrollbar1. Try this code: Private Sub UserForm_Initialize() Frame2.Height = Frame1.Height * 2 ScrollBar1.Max = Frame1.Height ScrollBar1.LargeChange = ScrollBar1.Max / 4 ScrollBar1.SmallChange = 8 End Sub Private Sub ScrollBar1_Change() Frame2.Top = -ScrollBar1.Value End Sub Private Sub ScrollBar1_Scroll() Frame2.Top = -ScrollBar1.Value End Sub -- HTH. Best wishes Harald Followup to newsgroup only please "Jmbostock " skrev i melding ... I've a userform that sometimes extends beyond the edge of the screen, so i'd like to put a vertical scroll bar in to view the whole thing. I've tried google, but the closest i got was a page in german, which i don't speak. Can anyone explain or direct me to a webpage that can tell me how to put a scroll bar into a large userform to scroll to the bottom and top. I'm not sure if it matters, but the userforms size is variable based on the number of rows matching particular criteria. I can't imagine it will, but just thought i would mention it just in case it effects it. Thanks James --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll Bars in UserForms
Userform
ScrollBars Look at the properties of your userform. See what the height of the form is. Assume it is 300 Now look at the scroll height property and set it to match ( 300 for the example) Now go back to the height property and make it something small. Start with half the height (150 for the example) Set the scrollbars property to frmScrollBarsVertical now show your form. You should be able to scroll your form. -- Regards, Tom Ogilvy "Jmbostock " wrote in message ... I've a userform that sometimes extends beyond the edge of the screen, so i'd like to put a vertical scroll bar in to view the whole thing. I've tried google, but the closest i got was a page in german, which i don't speak. Can anyone explain or direct me to a webpage that can tell me how to put a scroll bar into a large userform to scroll to the bottom and top. I'm not sure if it matters, but the userforms size is variable based on the number of rows matching particular criteria. I can't imagine it will, but just thought i would mention it just in case it effects it. Thanks James --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
scroll bars | Excel Worksheet Functions | |||
SCROLL BARS | Excel Discussion (Misc queries) | |||
Scroll bars | Excel Discussion (Misc queries) | |||
Scroll bars | Excel Discussion (Misc queries) | |||
What is a clean way of controlling Scroll bars when using filters with Userforms? | Excel Programming |