Hallo
ich nutze folgenden Code um eine Excel Datei zu öffnen.
Leider öffnet sich die Userform im Hintergrund, wenn ich das über die Datei mache.
Ich möchte aber, das sie sich im Vordergrund öffnet und nicht hinter den Datei-Explorer oder ähnlichen.
Wie muss ich den Code verändern?
Option Explicit
Dim Excel, FSO, Path
Set Excel = WScript.CreateObject("Excel.Application")
Set FSO = CreateObject("Scripting.FileSystemObject")
Path = FSO.GetParentFolderName(WScript.ScriptFullName)
Excel.Visible = True
Excel.Workbooks.Open Path & "\Muster_Oelblatt_2.1.xltm", , , , "xlNormal"
Set Excel = Nothing
Set FSO = Nothing
WScript.Quit
ich nutze folgenden Code um eine Excel Datei zu öffnen.
Leider öffnet sich die Userform im Hintergrund, wenn ich das über die Datei mache.
Ich möchte aber, das sie sich im Vordergrund öffnet und nicht hinter den Datei-Explorer oder ähnlichen.
Wie muss ich den Code verändern?
Option Explicit
Dim Excel, FSO, Path
Set Excel = WScript.CreateObject("Excel.Application")
Set FSO = CreateObject("Scripting.FileSystemObject")
Path = FSO.GetParentFolderName(WScript.ScriptFullName)
Excel.Visible = True
Excel.Workbooks.Open Path & "\Muster_Oelblatt_2.1.xltm", , , , "xlNormal"
Set Excel = Nothing
Set FSO = Nothing
WScript.Quit