Senso
Inventaris
- Lid geworden
- 13 jun 2016
- Berichten
- 11.175
- Besturingssysteem
- W10 Pro en W11 Pro
- Office versie
- Office 2007 H&S en Office 2021 Prof Plus
Code:
Sub SvMe()
'Saves filename as value of C9 plus the current date
Dim newFile As String, fName As String
' Don't use "/" in date, invalid syntax
fName = Range("C9").Value
'Change the date format to whatever you'd like, but make sure it's in quotes
newFile = fName & " " & Format$(Date, "yyyy-mm-dd")
' Change directory to suit your PC, including USER NAME
ChDir _
"B:\"
ActiveWorkbook.SaveAs Filename:=newFile
End Sub
Deze stond oorspronkelijk in de code:
"C:\Documents and Settings\ USER NAME \Desktop"
Ik maak daarvan "B:"
Echter wat ik ook doe, het bestand wordt opgeslagen op E: