Results 1 to 3 of 3

Thread: How can I check to see if the documents folder is empty?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Posts
    6

    Post

    Does anybody know how to do that? I need to check the documents folder in the start menu to see if it is empty or not. Thanks...

  2. #2
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    Post

    Hello brianod,

    Try this:

    Private Sub Form_Load()
    If Len(Dir("c:\test\*.*")) = 0 Then
    MsgBox "empty"
    Else
    MsgBox "not empty"
    End If
    End Sub

    Nice regards.

  3. #3
    Lively Member
    Join Date
    May 1999
    Posts
    100

    Post

    Hi.. Why make it "hard" =)
    use this instead.

    Code:
    Private Sub Form_Load()
        If Dir("c:\doc\*.*") = "" Then msgBox "Empty"
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width