Hi Paul
As long as you cell contains a valid file path, you can use this:
Sub SaveAsCellName()
Dim FilePathName As String
'Written by OzGrid Business Applications
'www.ozgrid.com
FileCellName = Sheets("Sheet1").Range("A1")
ThisWorkbook.SaveAs FileCellName & sdata.xls
End Sub
Dave
OzGrid Business Applications
Hi Paul
As long as you cell contains a valid file path, you can use this:
Sub SaveAsCellName()
Dim FilePathName As String
'Written by OzGrid Business Applications
'www.ozgrid.com
FileCellName = Sheets("Sheet1").Range("A1")
ThisWorkbook.SaveAs FileCellName & "sdata.xls"
End Sub
Dave
OzGrid Business Applications
Thanks but that didn't work please help
When I run the macro the debugger highlights the line:
ThisWorkbook.SaveAs FileCellName & CustRef.xls
and displays the message Object Required.
Thanks
Re: Thanks but that didn't work please help
Hi Paul
That first one slipped through without the quotations, it should be:
Sub SaveAsCellName()
Dim FilePathName As String
'Written by OzGrid Business Applications
'www.ozgrid.com
FileCellName = Sheets("Sheet1").Range("A1")
ThisWorkbook.SaveAs FilePathName & "CustRef.xls"
End Sub
But as I said you will need to be sure the cell contains a valid path, eg:
C:\MyDocuments\
Dave
OzGrid Business Applications