Results 1 to 4 of 4

Thread: [RESOLVED] [EXCEL] Excel doesn't stay invisible after FileDialog closes. Really nobody???

Threaded View

  1. #1

    Thread Starter
    New Member RaytracerFFM's Avatar
    Join Date
    Jun 2010
    Location
    Frankfurt, Germany
    Posts
    15

    Resolved [RESOLVED] [EXCEL] Excel doesn't stay invisible after FileDialog closes. Really nobody???

    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:

    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
    Excel shouldn't become visible again before Application.Visible is set True for as much as i understand.

    Any help would be greatly appreciated
    Last edited by RaytracerFFM; Jun 9th, 2010 at 05:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width