I'm attempting to conditionally launch a user form when excel opens based on the file's name. However, I believe that the code is running before the file fully launches, giving me an error.
Private Sub Workbook_Open()
Dim name As String
name = ActiveWorkbook.FullName
If InStr(name, "Export Checksheet") > 0 Then
UserForm1.Show
End If
End Sub
Testing this on a file that's already open runs fine, but trying to let it run naturally as the file opens causes a Run-time error '91' and points me at the line defining the name variable.