vba help on declaring varible
:help
Hi Team,
I am new in vba , learning it, I have a question, my below macro works give the result.
But if I write variable in between Parenthesis , my macro didn't work. like Sub test(dim i as integer)
Below macro works.
Code:
Sub test()
Dim i As Long
For i = 1 To 10
Range("a" & i).Value = i
Next i
End Sub
This didn't work.
Code:
Sub test(i As Long)
For i = 1 To 10
Range("a" & i).Value = i
Next i
End Sub
On google I come across coding like as below?.... So which scenerio we have to declare
variable like the below One. Thanks in advance!
Code:
Sub QuickSort(coll As Collection, first As Long, last As Long