I have a subroutine that opens a file based on some input from the user.... generally the file it looks for has a standard naming format used. However sometimes the person responsible for this will use some other name, thus screwing up my macro.
Rather than excel showing the generic error box, confusing the user completely, I want it to show MY msgbox telling the user to go in and find the file manually...
I'm sure I've done this before, but I'm drawing a blank on how I managed it. Any help out there??
Sub openphiac()
Dim strfolder as string
Dim strphiacfile as string
strfolder = Range("folder")
strphiacfile = Range("phiacfile")
Workbooks.Open Filename:="O:\Phiac Data\PhiacTables\" & strfolder & "\" & strphiacfile & ".xls"
End Sub
Rather than excel showing the generic error box, confusing the user completely, I want it to show MY msgbox telling the user to go in and find the file manually...
I'm sure I've done this before, but I'm drawing a blank on how I managed it. Any help out there??
Sub openphiac()
Dim strfolder as string
Dim strphiacfile as string
strfolder = Range("folder")
strphiacfile = Range("phiacfile")
Workbooks.Open Filename:="O:\Phiac Data\PhiacTables\" & strfolder & "\" & strphiacfile & ".xls"
End Sub