MATLAB BUILDER EX 1 Uživatelská příručka Strana 44

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 182
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 181 182

Komentáře k této Příručce

Žádné komentáře