Lagache
XLDnaute Occasionnel
Bonjour le Forum
Je cherche à installer un scrollbar sur une feuille de calcul pour faire défiler de gauche à droite et inversement cellule par cellule , mais je ne trouve pas le code correspondant
J'ai essayé d'adapter ce code avec l'aide de Vba :
Private Sub ScrollBar1_Initialize()
ScrollBar1.Min = -225
ScrollBar1.Max = 289
ScrollBar1.Value = 0
Label1.Caption = "-225 -----Widgets----- 289"
Label1.AutoSize = True
Label2.Caption = ""
End Sub
Private Sub ScrollBar1_Change()
Dim ScrollSaved As Integer
'Previous ScrollBar setting
Label2.Caption = " Widget Changes " _
& (ScrollSaved - ScrollBar1.Value)
End Sub
Private Sub ScrollBar1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label2.Caption = " Widget Changes " _
& (ScrollSaved - ScrollBar1.Value)
ScrollSaved = ScrollBar1.Value
End Sub
Private Sub ScrollBar1_Scroll()
Label2.Caption = (ScrollSaved - ScrollBar1.Value) & " Widget Changes by Scrolling"
End Sub
Mais cela ne fonctionne pas
Merci de votre aide
Je cherche à installer un scrollbar sur une feuille de calcul pour faire défiler de gauche à droite et inversement cellule par cellule , mais je ne trouve pas le code correspondant
J'ai essayé d'adapter ce code avec l'aide de Vba :
Private Sub ScrollBar1_Initialize()
ScrollBar1.Min = -225
ScrollBar1.Max = 289
ScrollBar1.Value = 0
Label1.Caption = "-225 -----Widgets----- 289"
Label1.AutoSize = True
Label2.Caption = ""
End Sub
Private Sub ScrollBar1_Change()
Dim ScrollSaved As Integer
'Previous ScrollBar setting
Label2.Caption = " Widget Changes " _
& (ScrollSaved - ScrollBar1.Value)
End Sub
Private Sub ScrollBar1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label2.Caption = " Widget Changes " _
& (ScrollSaved - ScrollBar1.Value)
ScrollSaved = ScrollBar1.Value
End Sub
Private Sub ScrollBar1_Scroll()
Label2.Caption = (ScrollSaved - ScrollBar1.Value) & " Widget Changes by Scrolling"
End Sub
Mais cela ne fonctionne pas
Merci de votre aide
Dernière édition: