我在VBA上的返回功能遇到了一些麻烦,希望有人能够帮助我解决问题。
功能如下:
listA = [1, 2, 3 , 4];
listB = ['a', 'b', 'c']
this.combined = this.listA.map((x, i)=> {
return {"a": x, "b": this.listB[i]}
} );
问题摘要:
知道为什么会这样吗?
任何帮助将不胜感激:)
答案 0 :(得分:1)
使用Sqr函数..并在VBA中没有Return关键字
Sub Test()
Debug.Print Hypotenuse(5, 3)
End Sub
Function Hypotenuse(side1 As Double, side2 As Double) As Double
Hypotenuse = Sqr((side1 ^ 2) + (side2 ^ 2))
End Function