Is there a way increase or decrease a variable in a running macro on a userform with a spinbutton on a userform.
e.g. the value of X which controls the speed of a macro . . .
Private Sub CommandButton1_Click ()
For Each w In Selection.Words
w.Font.bold = True
For i = 1 To X [default X = 1000] / spinbutton1.value
Debug.Print i
Next i
w.Font.bold = False
Next w
End Sub
. . . by using a spinbutton, so that when a user clicks the spinbutton the value of X changes in the running macro and its accorded speed? (So words in a document are bolded faster or slower.)
I couldn't even begin to guess how this might be done, if it's even possible?
e.g. the value of X which controls the speed of a macro . . .
Private Sub CommandButton1_Click ()
For Each w In Selection.Words
w.Font.bold = True
For i = 1 To X [default X = 1000] / spinbutton1.value
Debug.Print i
Next i
w.Font.bold = False
Next w
End Sub
. . . by using a spinbutton, so that when a user clicks the spinbutton the value of X changes in the running macro and its accorded speed? (So words in a document are bolded faster or slower.)
I couldn't even begin to guess how this might be done, if it's even possible?
Last edited: