0

I'm trying to resolve a recent problem involving a existing Excel macro, where it began throwing this error:

enter image description here

Debug highlights this part of the code:

    ActiveWorkbook.SaveAs Filename:= _
    "X:\Xxxx\Xxxx\Xxxx\Xxxx.xls", FileFormat:=xlExcel8 _
    , Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
    CreateBackup:=False
    Range("K36").Select

I don't work with the people who uses this macro, and the person who made this long left (with no documentation).

What this macro does, I'm not completely sure, I only know it creates multiple files based on the existing data. I've googled and did some research on this error, and identified it's a rather generic error involving saving of files, and a common cause is permission. Knowing this, I looked up the permission of the directory and files. Everything looks fine.

I copied the directory to my work station and performed the macro (changing the uri address) and used the macro... and it works. This further reinforces it may be a permission issue, however, applying the permission to the upper level of the directory didn't work (I asked Sys Admin).

Any advice?

TylerH
  • 20,799
  • 66
  • 75
  • 101
solaris
  • 33
  • 3

2 Answers2

1

I resolved this by changing the path from absolute URI to that of relative. It seemed to have solved this specific problem.

solaris
  • 33
  • 3
0

I also feel that it might be a permission issue because it works for me also fine.. the detailed discussion on the same issue happened earlier, you may refer the details here