Hallo,
ich versuche einen Vektor an eine Function zu übergeben und erhalte den "Argumenttyp Byref unverträglich" Fehler. Wo liegt den hier mein Fehler?
Vielen Dank für jegliche Hilfe
Hier ein Minimalbeispiel:
Option Explicit
Sub test()
Dim x As Double
Dim t(1 To 3, 1 To 1) As Double
x = 1
t(1, 1) = 2.4
t(2, 1) = 3.987654
t(3, 1) = 4.12345
MsgBox FunktionX(x, t)
End Sub
Function FunktionX(a As Double, b As Double) As Double
Dim FunktionX(1 To 3, 1 To 1) As Double
For i = 1 To UBound(t)
FunktionX(i) = a * b(i)
Next
End Function
|