RiaMelissaJaravata
Member
Hi Everyone,
Do you have any idea on codes that will open a file but will show error message when the filename is not "Sample_(month)_(day)"
I have this but I don't know how to modify it:
filetoopen = Application.GetOpenFilename _
(Title:="Please choose a Report to Parse", _
FileFilter:="")
If filetoopen = False Then
MsgBox "No File Specified.", vbExclamation, "ERROR"
Exit Sub
Else
Set ivr = Workbooks.Open(Filename:=filetoopen)
End If
Also, I am just concerned on the word "Sample_"... The user can open any month or day file... I just need the user to open a file that has a filename "Sample_*". I hope you can help me. Thank you so much!
Do you have any idea on codes that will open a file but will show error message when the filename is not "Sample_(month)_(day)"
I have this but I don't know how to modify it:
filetoopen = Application.GetOpenFilename _
(Title:="Please choose a Report to Parse", _
FileFilter:="")
If filetoopen = False Then
MsgBox "No File Specified.", vbExclamation, "ERROR"
Exit Sub
Else
Set ivr = Workbooks.Open(Filename:=filetoopen)
End If
Also, I am just concerned on the word "Sample_"... The user can open any month or day file... I just need the user to open a file that has a filename "Sample_*". I hope you can help me. Thank you so much!