malleshg24
01-14-2018, 01:19 PM
: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.
Sub test()
Dim i As Long
For i = 1 To 10
Range("a" & i).Value = i
Next i
End Sub
This didn't work.
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!
Sub QuickSort(coll As Collection, first As Long, last As Long
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.
Sub test()
Dim i As Long
For i = 1 To 10
Range("a" & i).Value = i
Next i
End Sub
This didn't work.
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!
Sub QuickSort(coll As Collection, first As Long, last As Long