Hello party people. I was provided with some code that works great (auto saving to desktop and auto naming file), but now I am trying to customize it by end user:
Sub SaveMe()
Dim NewName As String
NewName = Sheets("Sheet1").Range("A1") & " - " & Sheets("Sheet1").Range("B1")
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\All Users\Desktop\" & NewName & ".xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
Instead of saving to the desktop of all users, I want it to save to a folder on the desktop of a specific user. I have changed "C:\Documents and Settings\All Users\Desktop\" to read "C:\Documents and Settings\aportillo\Desktop\PO" to save to the folder PO that's on the desktop (not a shortcut) of user aportillo, but it still saves right to the desktop and adds the word PO to the beginning of the file name. I thought it was as simple as just changing the path name to make it save differently. What I am doing wrong? Thank you.
Sub SaveMe()
Dim NewName As String
NewName = Sheets("Sheet1").Range("A1") & " - " & Sheets("Sheet1").Range("B1")
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\All Users\Desktop\" & NewName & ".xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
Instead of saving to the desktop of all users, I want it to save to a folder on the desktop of a specific user. I have changed "C:\Documents and Settings\All Users\Desktop\" to read "C:\Documents and Settings\aportillo\Desktop\PO" to save to the folder PO that's on the desktop (not a shortcut) of user aportillo, but it still saves right to the desktop and adds the word PO to the beginning of the file name. I thought it was as simple as just changing the path name to make it save differently. What I am doing wrong? Thank you.