For Loop Example VBA Excel
Example 1:-
Sub myforloop()
Dim i As Integer
Dim inp As Integer
Dim Disp As Integer
Disp = InputBox("Please Enter Display Number")
inp = InputBox("Please entry number for looping")
For i = 1 To inp
Cells(i, 1).Value = Disp
Next i
End Sub
Example 1:-
Sub myforloop()
Dim i As Integer
Dim inp As Integer
Dim Disp As Integer
Disp = InputBox("Please Enter Display Number")
inp = InputBox("Please entry number for looping")
For i = 1 To inp
Cells(i, 1).Value = Disp
Next i
End Sub