MATLAB BUILDER EX 1 Guida Utente Pagina 44

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 43
3 Programming with Excel Builder Components
3-10
aClass = CreateObject("mycomponent.myclass.1_0")
Call aClass.foo(1,y,x1,x2)
foo = y
Exit Function
Handle_Error:
foo = Err.Description
End Function
The second example rewrites the same function as a subroutine and uses Excel
ranges for input and output.
Sub foo(Rout As Range, Rin1 As Range, Rin2 As Range)
Dim aClass As Object
On Error Goto Handle_Error
aClass = CreateObject("mycomponent.myclass.1_0")
Call aClass.foo(1,Rout,Rin1,Rin2)
Exit Sub
Handle_Error:
MsgBox(Err.Description)
End Sub
Vedere la pagina 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 181 182

Commenti su questo manuale

Nessun commento