Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ActiveWorkbook.SaveAs Function - Can I specify the user account tosave the file with

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default ActiveWorkbook.SaveAs Function - Can I specify the user account to save the file with

If what you want is to merely determine who last edited the file, you
can examine the file properties for that.

On Mon, 25 Jan 2010 04:06:02 -0800 (PST), 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default ActiveWorkbook.SaveAs Function - Can I specify the user accountto save the file with

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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ActiveWorkbook.SaveAs Function - Can I specify the user accountto save the file with

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.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default ActiveWorkbook.SaveAs Function - Can I specify the user account to save the file with

You could save to a temp location, then shell out to "runas" but it's not
the way to go. You'd have to store the account details in the workbook, and
you have to use sendkeys to enter the password.

Tim


"goshute" wrote in message
...
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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default ActiveWorkbook.SaveAs Function - Can I specify the user account to save the file with

....or netuse might be better, since you can just supply the password in the
commandline.

Tim


"Tim Williams" wrote in message
...
You could save to a temp location, then shell out to "runas" but it's not
the way to go. You'd have to store the account details in the workbook,
and you have to use sendkeys to enter the password.

Tim


"goshute" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
saveas ActiveWorkbook.SaveAs Filename:=Range("A1").Value DarrenL Excel Programming 4 April 18th 09 07:54 AM
ActiveWorkbook.SaveAs Little Penny[_3_] Excel Programming 2 January 16th 08 02:23 AM
Help with ActiveWorkbook.SaveAs Martin X. Excel Programming 3 August 15th 07 02:15 PM
ActiveWorkbook.SaveAs franks Excel Programming 6 August 6th 07 10:04 PM
ActiveWorkbook.SaveAs - dealing with file already exists Adrian[_11_] Excel Programming 4 September 1st 05 02:47 PM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"