vba array declaration
arrayData = Array("A", "B", "C", "D", "E")
[a1].Resize(UBound(arrayData)) = Application.Transpose(arrayData)
vba array declaration
arrayData = Array("A", "B", "C", "D", "E")
[a1].Resize(UBound(arrayData)) = Application.Transpose(arrayData)
vba function array parameter
' Sample function with array parameter
Function processArr(Arr() As Variant) As String
Dim N As Variant
dim finalStr as string
For N = LBound(Arr) To UBound(Arr)
finalStr = finalStr & Arr(N)
Next N
processArr = finalStr
End Function
' ---------------------------------------------------------------
Sub TestMe()
Dim fString As String
Dim arr() As Variant
arr = Array("foo", "bar")
fString = processArr(arr)
End Sub
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us