Hi experts,
i believe this is a simple one, but i couldn't find anything on the subject elsewhere. Guess i must be doing something wrong![]()
My problem:
Excel is set to Visible = False. When I call Application.FileDialog(msoFileDialogFolderPicker) and the user either selects something or cancels out, the dialog is closed and Excel automatically becomes visible again.
Is there any way to keep Excel invisible after leaving FileDialog? I tried setting Visible to False again, which works, but you still can see Excel open up for a split second.
Here a code snippet that illustrates the problem:
Excel shouldn't become visible again before Application.Visible is set True for as much as i understand.Code:Public Sub Test() Dim vrtFileNamePath As Variant Application.Visible = False With Application.FileDialog(msoFileDialogFolderPicker) .InitialView = msoFileDialogViewList If .Show = -1 Then vrtFileNamePath = .SelectedItems(1) End If End With Application.Wait (Now + TimeValue("0:00:03")) Application.Visible = True End Sub
Any help would be greatly appreciated![]()




Reply With Quote