Kenny Lewis
08-03-2005, 01:26 AM
Hello everybody,
Please help me out. I am using [copied] the following code to automatically save a file with a filename and the current date. It works on my C: perfectly, but now I need to make the workbook available to everyone. Here is the problem, even when I change the directory from C: to our shared server, the file continues to save itself on my, or any other users local PC. What do I need to do?
Thanks, Kenny.
Option Explicit
Sub SvMe()
'Saves filename as value of A1 plus the current date
Dim newFile As String, fName As String
' Don't use "/" in date, invalid syntax
fName = Range("A1").Value
'Change the date format to whatever you'd like, but make sure it's in quotes
newFile = fName & " " & Format$(Date, "mmm-dd-yyyy")
' Change directory to suit your PC, including USER NAME
ChDir "S:\Logistics\A Warehouse\Mechanical Handling\Check Lists"
ActiveWorkbook.SaveAs Filename:=newFile
End Sub
Please help me out. I am using [copied] the following code to automatically save a file with a filename and the current date. It works on my C: perfectly, but now I need to make the workbook available to everyone. Here is the problem, even when I change the directory from C: to our shared server, the file continues to save itself on my, or any other users local PC. What do I need to do?
Thanks, Kenny.
Option Explicit
Sub SvMe()
'Saves filename as value of A1 plus the current date
Dim newFile As String, fName As String
' Don't use "/" in date, invalid syntax
fName = Range("A1").Value
'Change the date format to whatever you'd like, but make sure it's in quotes
newFile = fName & " " & Format$(Date, "mmm-dd-yyyy")
' Change directory to suit your PC, including USER NAME
ChDir "S:\Logistics\A Warehouse\Mechanical Handling\Check Lists"
ActiveWorkbook.SaveAs Filename:=newFile
End Sub