0

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.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Florian
  • 59
  • 8
  • Perhaps this helps: https://www.mrexcel.com/forum/excel-questions/386643-userform-always-top.html – jkpieterse Jul 23 '19 at 08:23
  • Thank you very much @jkpieterse ! The helping comment! Havent been googling enough i guess.. Thanks a lot! – Florian Jul 23 '19 at 11:37

0 Answers0