Saving A workbook

E

Ed Davis

I would like to be able to save a workbook to the (Computer User) document
folder without using the computer users name.
This would be done in a macro as I save several sheets this way.
Can someone help with this.
Thank You
 
A

Anthony Fontana

I am not sure what you are asking for . If you mean not using the name of
the (Computer user) in the name, then simply type in whatever the new name
for the workbook is. If you mean that you do not want the (Computer user)
name to show up in the "save in" folder, then it should say just My
Documents.
 
B

Bill Benson

I think you are talking about using the Shell specialfolder:

Sub SaveToMyDocs()
Dim MyDocsAddr As String
MyDocsAddr = CreateObject("WScript.Shell").SpecialFolders("My
Documents") & Application.PathSeparator
ActiveWorkbook.SaveAs MyDocsAddr & "Test.xls"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top