tomsweddy
06-25-2009, 01:44 AM
Hi,
I am using the following code to name the file when saving.
'Save the new workbook/Mail it/Delete it
TempFilePath = Environ$("temp") & "\"
'TempFileName = "Your New Employee " & Sourcewb.Name & " " & Format(Now, "dd-mmm-yy")
TempFileName = Range("E6").Value & ", CONTRACT, " & Format(Range("K8").Value, "dd.mm.yy")
The one highlighted out in the middle is the original one and it works fine where as the edited one I have put in place doesn't seem to name the file. Instead I just end up with x, CONTRACT, .xls as the filename.
It should be picking up a Name value (E6) and a date value (K8)....
Any thoughts on how to resolve???
Many Thanks
I am using the following code to name the file when saving.
'Save the new workbook/Mail it/Delete it
TempFilePath = Environ$("temp") & "\"
'TempFileName = "Your New Employee " & Sourcewb.Name & " " & Format(Now, "dd-mmm-yy")
TempFileName = Range("E6").Value & ", CONTRACT, " & Format(Range("K8").Value, "dd.mm.yy")
The one highlighted out in the middle is the original one and it works fine where as the edited one I have put in place doesn't seem to name the file. Instead I just end up with x, CONTRACT, .xls as the filename.
It should be picking up a Name value (E6) and a date value (K8)....
Any thoughts on how to resolve???
Many Thanks