VBA What's the underlying difference between call Sub or Function with or without parentheses
问题 I had an issue with passing an Array to a Sub By Reference, but the Array actually not get modified. I managed to fix that , but I want to know why. Here is the example. Private Function fCountArray(ByRef arrayVar As Variant) arrayVar(0) = 333 End Function Sub Test1() Dim changedArr As Variant Dim notChangedArr As Variant ' create 2 quick array changedArr = Array(1, 2, 33, 56, 76, 89, 10) notChangedArr = Array(1, 2, 33, 56, 76, 89, 10) 'intest = Array(3, 1, 2) fCountArray (notChangedArr)