Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Setting Attributes (XL97;SR2)

    When I change an XL file's attribute(file located on another server) using the following code the attribute being changed is not always being applied.

    Sub ChngAttrib()
    TheFile = "D:OnAnotherServerXYZ.xls"

    Result = GetAttr(TheFile) And vbReadOnly
    If Result = 1 Then
    SetAttr (TheFile), vbNormal
    Run some code
    SetAttr (TheFile), vbReadOnly
    End If
    End Sub

    Any suggestions as to why the attribute setting does not always seem to be applied would be appreciated.

    Thanks,
    John

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Setting Attributes (XL97;SR2)

    Does the user running the code have access rights on the server to change a files attributes in that directory?
    Legare Coleman

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Setting Attributes (XL97;SR2)

    Legare,

    The issue related to a shared drive mapping on the second server where the files originate from. The resolution was to create a new share with the appropriate user permissions and map a drive to the new share drive.

    John

Posting Permissions

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