ActiveWorkbook.SaveAs Function - Can I specify the user accountto save the file with
On Jan 25, 8:57*am, TyreDude wrote:
On 25 Jan, 12:58, goshute wrote:
On Jan 25, 7:06*am, TyreDude wrote:
Hello,
Can I use the ActiveWorkbook.SaveAs function and include the user
account to save the file as? For example, I want to save the file to a
directory where the user running the macro only has read only access.
This is why I want to specify the account to use (which has full
access), to save the file successfully.
i..e. ActiveWorkbook.SaveAs User: Domain\Name Password: xxxxxxx
Is there a way this can be done?
Thanks,
Brett
Security is based on the user that is signed onto the machine. *Change
permissions on the directory so the user can write to the directory,
or re-assign the task to someone that has the necessary permissions.
Goshute
I need Excel to save the file as a different user (i.e. service
account) who has permissions to write to the directory. *I cannot re-
assign the task to another user, it is not possible. *I just want to
know if Excel can save the file using a different user account. *The
user cannot write to the directory as I do not want them to change the
file.- Hide quoted text -
- Show quoted text -
I don't think Excel and VBA can do what you want. Permissions to the
directorys are assigned by Windows when the user logs on to the pc not
by the application. Even if more than one user is signed on to a
single pc, each users permissions apply to that user. I can only
guess that this functionality was left out of VBA because of virues
and other malware.
Goshute
|