Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello:
I would like to make a scroll bar that while dragging the bar up or down a small text box should appear and display which value the scroll bar is? Is it possible? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 9, 2:08*am, art wrote:
Hello: I would like to make a scroll bar that while dragging the bar up or down a small text box should appear and display which value the scroll bar is? Is it possible? Thanks. This works for me on a UserForm. Add a label that is positioned over the scrollbar. Set it's visible property to false. Call it lblValue. In the ScrollBar Scroll event: Private Sub ScrollBar1_Scroll() With Me.lblValue .ZOrder (0) .Caption = ScrollBar1.value .Visible = True End With End Sub In the ScrollBar ChangeEvent: Private Sub ScrollBar1_Change() Me.lblValue.Visible=False End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, but then it does not show up when I scroll by pressing the up and
down arrows, it only shows up when I drag the bar up and down. Is it possible to have both? "dbKemp" wrote: On Nov 9, 2:08 am, art wrote: Hello: I would like to make a scroll bar that while dragging the bar up or down a small text box should appear and display which value the scroll bar is? Is it possible? Thanks. This works for me on a UserForm. Add a label that is positioned over the scrollbar. Set it's visible property to false. Call it lblValue. In the ScrollBar Scroll event: Private Sub ScrollBar1_Scroll() With Me.lblValue .ZOrder (0) .Caption = ScrollBar1.value .Visible = True End With End Sub In the ScrollBar ChangeEvent: Private Sub ScrollBar1_Change() Me.lblValue.Visible=False End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 9, 10:52 am, art wrote:
Thanks, but then it does not show up when I scroll by pressing the up and down arrows, it only shows up when I drag the bar up and down. Is it possible to have both? "dbKemp" wrote: On Nov 9, 2:08 am, art wrote: Hello: I would like to make a scroll bar that while dragging the bar up or down a small text box should appear and display which value the scroll bar is? Is it possible? Thanks. This works for me on a UserForm. Add a label that is positioned over the scrollbar. Set it's visible property to false. Call it lblValue. In the ScrollBar Scroll event: Private Sub ScrollBar1_Scroll() With Me.lblValue .ZOrder (0) .Caption = ScrollBar1.value .Visible = True End With End Sub In the ScrollBar ChangeEvent: Private Sub ScrollBar1_Change() Me.lblValue.Visible=False End Sub Always have the label visible and update the value in the ScrollBar change event. Remove the lblValue.Visible=False in change event. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Scroll bar adding to text box | Excel Discussion (Misc queries) | |||
Scroll bar not appearing in text box | Excel Programming | |||
Copying text within text box and having scroll bar appear | Excel Programming | |||
Text box w/ scroll ability | Excel Programming | |||
Text Box w/Scroll Bar | Excel Discussion (Misc queries) |