I`m currently working on a small CATScript, that is launching an Excel VBA Userform. Everything works flawless, apart from the fact, that the launched Uesrform is stuck to the background with CATIA blocking the Excel Userform.
What can I do to get the Excel Form to the foreground without actively launching the complete workbook?
'Code in CATScript launching the Excel Macro
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = ObjExcel.Workbooks.Open("C:\Users\Flori\CATIA_Files\test.xlsm")
objExcel.Application.DisplayAlerts = True
objExcel.Application.Run "Modul1.Run"
'Code in Modul1
Sub Run()
Material_Form.Show vbModeless
End Sub
Expected software would open the Userform with Excel itself running in the background. Userform should be "on top" of CATIA and any other programm running.