I've been trying to make the caption of a label change from 0-10 when clicking in a button so each time that I click one of the buttons it adds 1 all the way to 10 and another that does the oposite (minus 1 until you reach 0)
I've tried this so far but it doesn't seem to work.
Private Sub FRosaU_Click()
For CuboRosa.Caption = Val(CuboRosa.Caption) + 1 To CuboRosa.Caption = 10
Next
End Sub
Private Sub FRosaD_Click()
For CuboRosa.Caption = Val(CuboRosa.Caption) - 1 To CuboRosa.Caption = 0
Next
End Sub
I've also tried this
Private Sub FVU_Click()
Dim nvu As Integer
For CuboVerde.Caption = Val(nvu) + 1 To Val(nvu) = 10
Next
End Sub