We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub cmdLogin_Click() Call increment(1) End Sub Private Sub increment(progctr As Long) RunStatus = True 'Make sure the loop can run progctrfinal = TextBox1.Value Do While RunStatus = True And progctr < progctrfinal Call CommandCode(progctr) progctr = progctr + 1 Label3.Caption = progctr 'output the counter value, using the label caption as a store of the current value DoEvents If progstuck Then Exit Do Loop End Sub Private Sub Pause_Click() RunStatus = False End Sub Private Sub Resume_Click() RunStatus = True increment CLng(Label3.Caption) + 1 'restart the counting using the preserved value of the counter End Sub Function CommandCode(PC As Long) Dim command As String Dim argPassedIn As String Dim myarray As Variant command = Worksheets("GUI").Cells(PC + 1, 2).Value argPassedIn = Worksheets("GUI").Cells(PC + 1, 3).Value 'There is only one argument If InStr(argPassedIn, ",") = False And Len(argPassedIn) > 0 Then CallByName Me, command, VbMethod, argPassedIn 'There is no argument If Len(argPassedIn) = 0 Then CallByName Me, command, VbMethod 'There are 2 arguments If InStr(argPassedIn, ",") Then myarray = Split(argPassedIn, ",") CallByName Me, command, VbMethod, myarray End If End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.