![]() |
![]() |
GMSManager.RunMacro
Function RunMacro(ModuleName As String, MacroName As String, Parameters() As Variant) As Variant
Member of GMSManager
The RunMacro method runs a function or a subroutine located in another GMS module. This method returns a variant.
The following subroutine is contained in the module MyModule, which is part of the GMS file GlobalMacros:
Sub MyTestSub() MsgBox "Hello world!" End Sub Sub Test() GMSManager.RunMacro "GlobalMacros", "MyModule.MyTestSub" End Sub The following function is contained in the module "MyModule" which is part of the GMS file "GlobalMacros." Function Multiply(x As Double, y As Double) As Double Multiply = x * y End Function Sub Test() Dim v As Double v = GMSManager.RunMacro("GlobalMacros", "MyModule.Multiply", 4, 7) MsgBox "4 * 7 = " & v End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.