|You should tell us what you mean by "i have this macro but it does not work ".|
What isn't working? Are you getting an error? Is it not updating the time? Something different?
A few things I see...
1 - You say that you want "to automatically update date the document was saved", yet you are using the Time function not the Date function.
2 - You are saving the workbook and then setting the time in A1. That seems backward to me. I'd have the code put the Date/Time in the cell before the Save, otherwise the Date/Time that will be saved will be the Date/Time from right after the previous Date/Time that the file was saved.
3 - This appears to be a macro that needs to be manually run. You might want to consider using the BeforeSave event in the ThisWorkbook module.
The BeforeSave event fires automatically each time you Save the workbook and runs the instructions found within the macro before the Save occurs.
4 - Why are you checking A1 for vbNullString? If you want the Date/Time in the cell, you won't get it if A1 is blank. Leave out the IF so that the Date (or in your case, the Time) will be placed in the cell every time, reagardless of whether A1 is blank or not the time of the Save.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.