写一个判断文件是否存在的函数
Function ExistsFile_UseFso(strPath As String) As Boolean
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
ExistsFile_UseFso = fso.FileExists(strPath)
Set fso = Nothing
End Function
然后在你loadpicture之前判断一下:
if ExistsFile_UseFso("E:\相片\李艳.JPG") then
Image1.Picture = LoadPicture("E:\相片\李艳.JPG")
end if