替換
Public Sub afficher_signal(ByRef signal() As Integer, ByVal nb_ligne As Integer)
與
Public Sub afficher_signal(ByRef signal, ByVal nb_ligne As Integer)
或
Public Sub afficher_signal(ByRef signal as Variant, ByVal nb_ligne As Integer)
的下面演示了一個樣品使用的afficher_signal
Public Sub Main()
Dim arr As Variant
arr = Array(1, "yo", 3, 10 Mod 2, 5.25)
afficher_signal arr, 0
afficher_signal2 arr, 0
End Sub
Public Sub afficher_signal(ByRef signal As Variant, ByVal nb_ligne As Integer)
Dim i As Long
For i = LBound(signal) To UBound(signal)
Debug.Print signal(i)
Next i
End Sub
Public Sub afficher_signal2(ByRef signal, ByVal nb_ligne As Integer)
Dim i As Long
For i = LBound(signal) To UBound(signal)
Debug.Print signal(i)
Next i
End Sub
只需'ByRef signal()'(不要'as ...')應該這樣做。 –
沒有工作.. :( – djosimd
對不起 - 刪除括號 –