XJOutsider
05-20-2010, 03:07 PM
I have a macro I am using to save a file to the user Desktop in a specific Folder.
Dim LDate As String
LDate = Date
Dim USERID As String
USERID = Environ("username")'us this to complete the path with there profile id.
wsPOMGR.SaveAs "C:\Profiles\USERID\Desktop\MRPScreen\Pomanager" & _
Format(Date, "MMDDYYYY") & ".xlsm", FileFormat:=52
What it looks like with my id hard coded into it.
Dim LDate As String
LDate = Date
wsPOMGR.SaveAs "C:\Profiles\mktstq\Desktop\MRPScreen\Pomanager" & _
Format(Date, "MMDDYYYY") & ".xlsm", FileFormat:=52
When I look in the locals it shows USERID as "mktstq"
What am I am doing wrong?
Dim LDate As String
LDate = Date
Dim USERID As String
USERID = Environ("username")'us this to complete the path with there profile id.
wsPOMGR.SaveAs "C:\Profiles\USERID\Desktop\MRPScreen\Pomanager" & _
Format(Date, "MMDDYYYY") & ".xlsm", FileFormat:=52
What it looks like with my id hard coded into it.
Dim LDate As String
LDate = Date
wsPOMGR.SaveAs "C:\Profiles\mktstq\Desktop\MRPScreen\Pomanager" & _
Format(Date, "MMDDYYYY") & ".xlsm", FileFormat:=52
When I look in the locals it shows USERID as "mktstq"
What am I am doing wrong?