Private Sub Form_Activate() With HScroll1 .Min = 0 .Max = 40 .SmallChange = 2 .LargeChange = 2 End With End Sub Private Sub HScroll1_Change() Label1.Caption = HScroll1.Value / 10 End Sub
Private Sub HScroll1_Change() With HScroll1 If .Value / 2 <> .Value \ 2 Then .Value = .Value + 1 Label1.Caption = .Value / 10 End With End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionIf .Value / 2 <> .Value \ 2 Then .Value = .Value + 1
If value mod 2 <> 0 then value = value + 1
Label1.Caption = (HScroll1.Value + (HScroll1.Value And 1)) / 10