Hi Robert
rather then use an input box to get the name of
the file to open try using the Applications
getopenfile, infact you should always endeavour
to use excels built in functions rather then
recreating the wheel....also cuts down on
programing for user input errors.
try something like this (Always more ways to skin a cat )
Option Explicit
Sub GetOpenPrnFile()
Dim sPrnFName As String
'Change const as required
Const AllowMultiSelect As Boolean = False
Const Caption As String = "Open Prn Files Only"
Const sFfilters As String = "Prn Files (*.prn), *.prn"
Const sS As String = " "
sPrnFName = Application.GetOpenFilename(sFfilters, , Caption, AllowMultiSelect)
If sPrnFName = "False" Then End
On Error GoTo Errf
Workbooks.Open sPrnFName
Exit Sub
Errf:
MsgBox Err.Number & sS & Err.Description, _
vbMsgBoxHelpButton, _
"File Error - " & _
Caption, Err.HelpFile, Err.HelpContext
End Sub
HTH
Ivan