(Declarations)
private someText as string
Sub Initialize
On Error Goto errh
Dim execStr As String
execStr = |
sub TestSub()
on error goto errh
dim i as Integer
dim r as Double
'!!!!!!!!!!! вот тут мы глобальной переменной задали значение, которое вернула функция из нашего модуля !!!!!!!!!!
someText = SomeFunc()
'!!!!!!!!!!!!
i = i + 5
r = i/0
eos:
Exit Sub
errh:
Messagebox Error & " (" & Cstr(Erl) & ")"
Resume eos
end sub
call TestSub()
|
Execute(execStr)
eos:
Exit Sub
errh:
Messagebox Error & " (" & Cstr(Erl) & ")"
Resume eos
End Sub
function SomeFunc() as string
SomeFunc = "This is SomeFunc!"
end function