Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar
Hello! I have a user from that unfortunately has become very long. Therefore
I need a scrollbar so that the user shall be able to scroll his/her way down to the end of the user form. I found something that looked like a scrollbar in the tools for the user form but I do not know how to write code for it and my help function for vba does not work. Please if you know how to write code for this, help me out! Thank you! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar
Why not use the built in scrollbar on the userform itself. Look at the
properties of the userform to turn on the scrollbar. -- Regards, Tom Ogilvy "Viktor Ygdorff" wrote: Hello! I have a user from that unfortunately has become very long. Therefore I need a scrollbar so that the user shall be able to scroll his/her way down to the end of the user form. I found something that looked like a scrollbar in the tools for the user form but I do not know how to write code for it and my help function for vba does not work. Please if you know how to write code for this, help me out! Thank you! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar
Or you could put this in your initialize event for the Userform:
Private Sub UserForm_Initialize() UserForm1.ScrollBars = fmScrollBarsVertical UserForm1.ScrollHeight = UserForm1.Height UserForm1.Height = UserForm1.Height / 2 End Sub This assumes in the VBE you can see the entire userform. -- Regards, Tom Ogilvy "Viktor Ygdorff" wrote: Hello! I have a user from that unfortunately has become very long. Therefore I need a scrollbar so that the user shall be able to scroll his/her way down to the end of the user form. I found something that looked like a scrollbar in the tools for the user form but I do not know how to write code for it and my help function for vba does not work. Please if you know how to write code for this, help me out! Thank you! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar
Yes thank you! I did not know that there was a scroll bar
property..Unfortunately me hlep function in vba does not work and I am not very good at this but I managed to show a scroll bar. However I do not think it works. I do not see the small box on the scroll bar that you should be able to pull up/down instead of using the arrows at the top/bottom. My code is: Private Sub UserForm_Initialize() Me.ScrollBars = fmScrollBarsVertical ........ I would be very thankful if you could help me with problem! Thanks again Tom! You save my life on a daily basis! "Tom Ogilvy" skrev: Or you could put this in your initialize event for the Userform: Private Sub UserForm_Initialize() UserForm1.ScrollBars = fmScrollBarsVertical UserForm1.ScrollHeight = UserForm1.Height UserForm1.Height = UserForm1.Height / 2 End Sub This assumes in the VBE you can see the entire userform. -- Regards, Tom Ogilvy "Viktor Ygdorff" wrote: Hello! I have a user from that unfortunately has become very long. Therefore I need a scrollbar so that the user shall be able to scroll his/her way down to the end of the user form. I found something that looked like a scrollbar in the tools for the user form but I do not know how to write code for it and my help function for vba does not work. Please if you know how to write code for this, help me out! Thank you! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar
Use the code I provided. the scroll bar doesn't work until you make the
scrollheight equal to the actual height and then make the actual height to something less. I made it 1/2 of the original height (so half the height is always in view), but you can make it something else. -- Regards, Tom Ogilvy "Viktor Ygdorff" wrote: Yes thank you! I did not know that there was a scroll bar property..Unfortunately me hlep function in vba does not work and I am not very good at this but I managed to show a scroll bar. However I do not think it works. I do not see the small box on the scroll bar that you should be able to pull up/down instead of using the arrows at the top/bottom. My code is: Private Sub UserForm_Initialize() Me.ScrollBars = fmScrollBarsVertical ....... I would be very thankful if you could help me with problem! Thanks again Tom! You save my life on a daily basis! "Tom Ogilvy" skrev: Or you could put this in your initialize event for the Userform: Private Sub UserForm_Initialize() UserForm1.ScrollBars = fmScrollBarsVertical UserForm1.ScrollHeight = UserForm1.Height UserForm1.Height = UserForm1.Height / 2 End Sub This assumes in the VBE you can see the entire userform. -- Regards, Tom Ogilvy "Viktor Ygdorff" wrote: Hello! I have a user from that unfortunately has become very long. Therefore I need a scrollbar so that the user shall be able to scroll his/her way down to the end of the user form. I found something that looked like a scrollbar in the tools for the user form but I do not know how to write code for it and my help function for vba does not work. Please if you know how to write code for this, help me out! Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I turn scroll lock off (2007 excel)? No scroll lock key | Excel Discussion (Misc queries) | |||
Cannot scroll with a Scroll Point Mouse | Excel Discussion (Misc queries) | |||
adding scroll bar to scroll on cell's content? | Charts and Charting in Excel | |||
Scroll horizontaly with mouse, create same system used to scroll . | New Users to Excel | |||
Scroll the screen view with the scroll bar | Excel Discussion (Misc queries) |