Hey guys,
I'm trying to save a file to the desktop for all that use it. The problem is, since we're all on a network, and the path to each users desktop is going to be different (ex: C:\Documents and Settings\user\Desktop(where user is going to be different)). Is there a way to modify my code with a way to pick up the users path to their desktop? Or am I going to have to code it in?
The "C:\workflow\" needs to change to the desktop. Thanks guys!!
I'm trying to save a file to the desktop for all that use it. The problem is, since we're all on a network, and the path to each users desktop is going to be different (ex: C:\Documents and Settings\user\Desktop(where user is going to be different)). Is there a way to modify my code with a way to pick up the users path to their desktop? Or am I going to have to code it in?
Code:
Private Sub CommandButton2_Click()
Dim savename As String
savename = Range("e6").value 'This is the cell with the info I need in the file 'name
ActiveWorkbook.SaveAs "C:\workflow\" & Format(Date, "yyyymmdd") & "_" & savename & ".xls"
End Sub