Hi,
Can an excel column be passed into a VB array in Excel and vice-versa? If so, I appreciate if some one could help me in this regard.
Thanks & Regards,
Krishna
Hi,
Can an excel column be passed into a VB array in Excel and vice-versa? If so, I appreciate if some one could help me in this regard.
Thanks & Regards,
Krishna
Dim myArray()
Function StoreColumnInArray (byVal SourceColumn as String)
Dim counter as Long
counter = Cells(Cells.Rows.Count,SourceColumn).End(xlUp).Row
ReDim myArray(1 to counter)
For i = 1 to counter
myArray(i)=Range( SourceColumn & i ).value
Next i
End Function
Function DumpArrayToColumn(byVal TargetColumn as Integer)
Dim i as Long
For i = 1 to Ubound(myarray)
Cells(TargetColumn,1).value = myarray(i)
Next i
End Sub
Saru mo ki kara ochiru
Ben Crisp
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks