Question : returns an array from function vba
Answered by : alex-lanaro-14ziv22qcwmq
Function arrayOfPiDigits() As Long() 'Add parenthesis after the data type Dim outputArray(0 To 2) As Long outputArray(0) = 3 outputArray(1) = 1 outputArray(2) = 4 arrayOfPiDigits = outputArray
End Function
Source : https://riptutorial.com/vba/example/28156/returning-arrays-from-functions#:~:text=A%20function%20in%20a%20normal,()%20after%20the%20data%20type.&text=Note%20that%20what%20is%20returned,changed%20by%20the%20calling%20procedure. | Last Update : Fri, 02 Oct 20