Public Function Param(name As String, Optional Val)
Static ParamCol As New Collection
On Error Resume Next
Param = Null
Param = ParamCol(name)
If IsMissing(Val) Then Exit Function
ParamCol.Remove name
If Not IsNull(Val) Then ParamCol.Add Val, name
End Function
REM TESTIROVANIE
Private sub tsts
Param "ID", 1000014 'установка
Param "D", Date
debug.print Param ("ID") 'получение
debug.print Param ("D")
end sub
|