如题

解决方案 »

  1.   

    Dim strFile As String
        
        strFile = Dir("g:\c#1", vbDirectory)
        
        If strFile = "" Then
            MsgBox "无"
        Else
            MsgBox strFile
        End If
      

  2.   

    为什么  Dir(App.Path & "\Record\" & sYear, vbDirectory) 一直得不到值?
    这个文件夹明明存在
      

  3.   

    Dim fso As Object
    Set fso = CreateObject("Scripting.FileSystemObject")If fso.FolderExists("C:\Test") = False Then
    MsgBox "文件夹不存在!"
    Exit Sub
    End If
    If fso.GetFolder("C:\Test").Files.Count > 0 Then
    MsgBox "不为空"
    End If
    fso.GetFolder("C:\Test").Delete True
    ---------
    www.vicmiao.com
    努力就有美好時光!
      

  4.   

    if  Dir(App.Path & "\Record\" & sYear, vbDirectory) = "文件夹名" then 
            msgbox "文件夹存在"
    else 
           msgbox "文件夹不存在"
    end if
      

  5.   

    或是使用   hn123(苗濤[www.vicmiao.com]) 
    这位大哥的!