Wednesday, March 15, 2017

For Loop to print 1 to 10

Sub Print1to10()

Dim i As Integer
    For i = 1 To 10
        Range("A" & i).Value = i
    Next
 
End Sub

No comments:

Post a Comment

*INTERVIEW QUESTIONS

* Ques 01. What is the difference between ByVal and ByRef and which is default ? Ans-  ByRef : If you pass an argument by reference when...