Results 1 to 2 of 2

Thread: Can Vb6 tell if a file is open

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    10
    Hi, is it possible for VB6 to tell if a file is open and if so could it give the username of the person with the file open.

    PS we use Novell

    thanks in advance

    MICK

  2. #2
    Addicted Member Quintonir's Avatar
    Join Date
    Mar 2001
    Location
    The Netherlands
    Posts
    155
    I've never heard of Novell, and no I don't know how to get the username (besides using the API Call GetUserName). But I do have a suggestion.

    Why don't you firstly check whether the file excists, using the Dir() function. If not, the file doesn't excist. Then, check it's file attributes (using the API Call GetFileAttributes, or the GetAttr() function). And at last, attempt opening the file; on error, the file is opened. It cannot be because it's protected or something, because you've checked it's attributes.

    I know this is not fully waterproof, but it's the least I could do


    Quintonir

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