I am opening a file with a macro and the file I am opening has a msgbox that opens right a way. I would like to close it so that my macro process can continue.
Can this be done?

<Sub open_File_Button()

SaveLocation (False)
     
    On Error Resume Next
    Workbooks(fname).Activate
     
     'If Excel cannot activate the book, then it's not open, which will
     '  in turn create an error not of the value 0 (no error)
     
    If Err = 0 Then
        'Exit Sub        'Exit macro if no error

SaveLocation (True)
        
    End If
     
    Err.Clear 'Clear erroneous errors
    Workbooks.Open fpath & fname

UserForm_File_Is_Open.Show
     
End Sub