![]() |
Scroll bar update
Hello:
I have this code for a scroll bar to change the active sheets: Private Sub ScrollBar1_Change() UserForm1.Label1.Caption = ScrollBar1.Value MySheet = UserForm1.ScrollBar1.Value MySheetName = "Sheet" & MySheet Sheets(MySheetName).Select End Sub However I would like that the active sheet should change while I'm draggind up or down. As of now only when I click on the "up" or down arrow, then it is considered a change and updates itself. But I need it to change while dragging up and down as well. Please help. thanks. |
Scroll bar update
On Nov 9, 2:12*am, art wrote:
Hello: I have this code for a scroll bar to change the active sheets: Private Sub ScrollBar1_Change() * * UserForm1.Label1.Caption = ScrollBar1.Value * * MySheet = UserForm1.ScrollBar1.Value * * MySheetName = "Sheet" & MySheet * * Sheets(MySheetName).Select End Sub However I would like that the active sheet should change while I'm draggind up or down. As of now only when I click on the "up" or down arrow, then it is considered a change and updates itself. But I need it to change while dragging up and down as well. Please help. thanks. Add the code to the Scrollbar Scroll event. |
All times are GMT +1. The time now is 02:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com