Thread: Auto Saving
View Single Post
  #1   Report Post  
GarToms GarToms is offline
Member
 
Posts: 33
Default Auto Saving

Hi All,

I'v found this code to auto save my worksheet with the name in C1. I want to specify the directory to save it to. Does anyone know what code i can put in it to save to the following directory
L:\Credit Management Team\Gareth Thomas

I also want to change it to just save the 1 sheet in the workbook.

Sub SaveAsCell()
Dim strName As String

On Error GoTo InvalidName
strName = Sheet1.Range("C1")
ActiveWorkbook.SaveAs strName

Exit Sub
InvalidName: MsgBox "The text: " & strName & _
" is not a valid file name.", vbCritical, "Ozgrid.com"
End Sub

Last edited by GarToms : January 31st 06 at 12:55 PM