Function ChkImg(img)
On Error Resume Next 為了捕獲錯誤信息
Dim RetunValue
RetunValue = True
如果路徑為空
If isnull(img) Then ChkImg = False:Exit Function
Set ChkJpeg = Server
If
ChkJpeg
If Err Then
RetunValue = False
End If
Else 如果組件不被支持
RetunValue = True
End If
必要的善後工作
If Err
Set ChkJpeg = Nothing
ChkImg = RetunValue
End Function
From:http://tw.wingwit.com/Article/program/net/201311/14386.html