Results 1 to 3 of 3

Thread: force files to be saved only in unc path

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    3

    force files to be saved only in unc path

    i need to restrict the user to save the file only in unc path like
    \\server\shared\...is this possible using common diaolg control..
    or is there any other way to do this..
    the user should be able to save in any folder in \\server\shared\..
    he should not be allowed to save the file on his local drive

    thanks a lot,
    rammu

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    You could try using the BeforeSave event thus :-
    '---------------------------------------------------------
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    If Left(CurDir, 1) = "C" Then
    MsgBox ("Cannot save this file to local drive.")
    Cancel = True
    End If
    End Sub
    '-------------------------------------------------------------

    But I am sure that your users will try other methods - such as simply copying the file across <<grin>>.

    ....... perhaps similar code in the Open event to stop it being used from there ?

    etc. etc. (keeps us in work I suppose).
    Regards
    BrianB
    -------------------------------

  3. #3
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    See how these things go on ...............

    If the user disables macros none of this works - so hide sheets until they are able to pass Go.
    Regards
    BrianB
    -------------------------------

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