FileDialog(msoFileDialogSaveAs).InitialFileName Runtime Error 70 RRS feed

  • Question

  • Hello,

    We have a very strange problem with one user executing this piece of code:

    Sub Save()
      Dim dialog As FileDialog
      Set dialog = Application.FileDialog(msoFileDialogSaveAs)
      dialog.AllowMultiSelect = False
      dialog.Title = "Save to fileserver"
      dialog.InitialFileName = "\\server\users\username\Desktop\test.xslx"
    End Sub

    One user is getting an Runtime Error 70: Permission Denied executing this code.

    This happens only when referring to this share.

    When we refer to another share, it works.

    When we map the share to a drive letter, everything works fine.

    When another user refers to this share as InitialFileName, his personal documents folder opens (as he has no permission to this share), but he doesn't get the runtime error.

    What could be causing this?

    Thanks for any help!

    Thursday, June 5, 2014 10:54 AM