Step 1: Include Tethys Macro SDK in your project.
Click on Project Menu in your Visual Basic Development Environment and select References.
Select Tethys Macro SDK ActiveX DLL from the list of Available References.
Step 2: Create an Object of the DLL
Create a new module by clicking on Project menu and select Add Module, an Add Module window appears, click on Open. The Module gets added to the project.
Write the following statement to create an object of Tethys Macro SDK ActiveX DLL.
Public SDKObject As New ClsWKSPSDK
Note: The name SDKObject can be anything. It is a name of the variable.
Step 3: Call the functions of the object for e.g. to Start the Recording, Stop Recording, Save Recording, Run Macro etc.
Below are the statements how to call the above mentioned functions.
StartRecording
SDKObject.StartRecording()
StopRecording
SDKObject.StopRecording()
SaveRecording
SDKObject.SaveRecording (App.Path & "\MyMacro.wksp",”MyPassword” , 1, 1)
RunMacro
SDKObject.RunMacro(App.Path & "\MyMacro.wksp",”MyPassword”)
Step 4: Test the functions.
Compile and execute your application. To test in debug mode you can directly press F5 to execute the program.