I don't know CATIA V5 and then CAA programming.
But, I know well VBA in other applications. Just an example, calling from VBscript a VBA subroutine recorded as a macro in a EXCEL sheet :
' Launch EXCEL and get the corresponding application object
Set ObjScript = CreateObject("Excel.Application"
' If you want to see EXCEL openned
ObjScript.Visible = True
' Loading of the workbook containing the macro
Call ObjScript.workbooks.open("D:\TRY.xls"
' Calling of the subroutine. I suppose one integer argument is expected
call objscript.run("TRY.xls!Feuil1.MyMacro",15)
' The subroutine is completed then I quit EXCEL
call ObjScript.quit
This code was tested and it is OK.
I'm not sure you can do this in the other direction, i.e. call and use of an VBscript object from VBA. I think you can only launch a VB script from VBA by using "shell" or "appactivate" function.
But I suppose you can use this principles for calling between to VBA.
Hi everyone!
Thanks to HBP, who answered last time.
I have a new problem now... It´s about programming... When you double click on the specificattions tree of a Product, the active component changes and the name of the component appears with a blue background...
Depending on which was the active component before launching my macro, the "Delete" or "Copy" methods of my macro are allowed or not, and consequently an error appears or not...
So I want to set the active component with code, so that before calling to ".Delete", the blue square is where I want...