I have got this code so far. It saves the file to my documents as the specified cell D5.
However
1.I want it to only save the 1 sheet 'Group Sign Off' instead of the 8 sheets in the workbook.
2. And it doesn't allow me to specify the save directory i.e.("L:\Credit Management Team\Gareth Thomas\".
does anyone know how to make these changes?
current code:
Sub SaveAsCell()
Dim strName As String
On Error GoTo InvalidName 'checks if filename D5 is valid
strName = Sheets("Group Sign-Off").Range("d5")
ActiveWorkbook.SaveAs strName
Exit Sub
'invalid filename output
InvalidName: MsgBox "The text: " & strName & _
" is not a valid file name.", vbCritical, "Ozgrid.com"
End Sub
|