 Sub ļǷ()'VB60VBAVSTOͨáҪãҪؼ

     On Error Resume Next '(Error)룬Զһ
    Dim s As String
    
    Dim MyPath As String
    MyPath = "C:\Users\zyg365\Desktop\CT\" 'βС\
    
    's = Dir(MyPath & "*.xls")
    'MsgBox s  'ֻͨѡļָ͵һļļڣͷΪ
    'If s = "" Then MsgBox"ѡļûдļ", 16, "ϵͳ"
    
    'ȡָ·ºַָļ()
    Dim sr$
    sr = Dir(MyPath & "*.bmp") 'ַָ*.bmpļȡļ
    MsgBox sr, , "ļƣֻʾһ"
    MsgBox Strings.Len(sr), , "2ļַ" 'ûзҪļ0ַָļַ
    
    
    Dim Filename As String
    'Filename = MyPath & Dir(MyPath & "*" & "141070001.png" & "*") 'Ĺؼ141070001.png
    Filename = MyPath & Dir(MyPath & "*" & "141070001" & "*") 'Ĺؼ141070001
    
    MsgBox Filename, 64, "ʾFilename"
    
    MsgBox Strings.Len(Dir(MyPath & "*" & "141070001" & "*")), , "ļַļڷ0"
    
    If Strings.Len(Dir(MyPath & "*" & "141070001" & "*")) <> 0 Then
        'If Strings.Len(Dir(MyPath & "*" & "141070001.png" & "*")) <> 0 Then
        MsgBox "ļڣ", 64, "ʾ1"
    Else
        MsgBox "ļڣ", 16, "ʾ1"
    End If
    
    If Strings.Len(Dir(MyPath & "*" & "141070001.png" & "*")) <> 0 Then
        MsgBox "ļڣ", 64, "ʾ2"
    Else
        MsgBox "ļڣ", 16, "ʾ2"
    End If
    
    If IO.File.Exists(Filename) = True Then 'ͼƬļ
        MsgBox "ļ", 64, "ʾ3"
    Else
        MsgBox "ļڣ", 16, "ʾ3"
    End If

End Sub