Saving A workbook

  • Thread starter Thread starter Ed Davis
  • Start date Start date
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
 
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.
 
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
 
Back
Top