i used the code above and came out an error "path not found" (point to line in red color)when i click the MRU list but when that file not in that directory.Code:Private Sub mnuFileMRU_Click(index As Integer) strFileNewName1 = (Left(mnuFileMRU(index).Caption, InStr(1, mnuFileMRU(index).Caption, "\DAF")) & "Map\") strFileNewName2 = (Mid(mnuFileMRU(index).Caption, InStr(1, mnuFileMRU(index).Caption, "MY"), 8) & ".bmp") strFileNewName3 = strFileNewName1 & strFileNewName2 Picture1.Picture = LoadPicture(strFileNewName3) Call ConvertMRU Call ENCExtractMRU Call setScale blnOkToMove = True End Sub
how to add code to above to avoid that kind of error occur and also instead it by a message box to let user know that the file is not find and please try select again.




Reply With Quote