- Код: Выделить всё
Dim ID() As Long
ReDim Preserve ID(0)
ID(0) = 1
ReDim Preserve ID(1)
ID(0) = 5
...
...
ReDim Preserve ID(n)
ID(n) = 3
Private Sub FindRow(ID() As Long)
...
...
End Sub
Dim ID() As Long
ReDim Preserve ID(0)
ID(0) = 1
ReDim Preserve ID(1)
ID(0) = 5
...
...
ReDim Preserve ID(n)
ID(n) = 3
Private Sub FindRow(ID() As Long)
...
...
End Sub
FindRow (ID())
FindRow (ID)
FindRow ({1, 3, 456, 362})
GSerg писал(а):Правильно - FindRow ID.
Dim ID() As Long
...
FindRow ID
FindRow ID()
Call FindRow(ID)
Call FindRow(ID())
FindRow (ID)
FindRow (ID())
Call FindRow((ID))
Call FindRow((ID()))
Call FindRow (ID)
Call FindRow ID
Private FindRow(ID() As Long) As Variant
...
...
IDznach = ID 'Присваиваем функции значение массива
End Function
Call ID = IDznach(ID)
Private FindRow(ID() As Long) As Long
Private FindRow(ID() As Long) As Variant
Private Function FindRow(ID() As Long) As Long()
Private Type MyGreatType
ID() As Long
End Type
Dim IDs As MyGreatType
ReDim Preserve MyGreatType.ID(0)
MyGreatType.ID(0) = 1
ReDim Preserve MyGreatType.ID(1)
MyGreatType.ID(1) = 5
...
...
ReDim Preserve MyGreatType.ID(n)
MyGreatType.ID(n) = 35
Private Sub FindRow(IDs As MyGreatType)
...
...
End Sub
Private Function FindRow(ID() As Long) As Long()
ID = FindRow(ID)
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 90