Code:
Dim mypath as string
Dim nychoice as string
Mychoice = “2017”
Mypath = activeworkbook.path
mypath = mypath & "\"
mypath = mypath & Str(mychoice) & " Car Hire Log.xlsm"
MsgBox ("PATH= ") & mypath
‘’at this point mgbox returns correct valid path
If dir(mypath) <>””
Workbooks.open mypath
Else
Msgbox(“file not found”)
Endif
Problem is workbook.open never finds file
Can anyone explain why this does not work please
Last edited by a moderator: