Hi Folks,
I am after a way of saving the current worksheet (sheet2 Service Report) to a new book and using cells C16 (Customer Name) and F10 (Date) to automatically save as the file name. I also need the folder path to be "C:\Documents and Settings\carl.walker\My Documents\Forms\".
I have had a crack at it with the code below, although I can get both bits to work well seperatly, I dont understand enough for me to combine them for what I want them to do.
If anyone could help me with this it would be much appreciated.....
Thanks in advance :o)
Carl
FIRST LINE OF CODE:
Sub MoveSheets()
Worksheets(Array("ServiceReport")).Copy
Set wbNew = ActiveWorkbook
With wbNew
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\carl.walker\My Documents\Forms\" & "\tester.xlsx"
.Close
End With
End Sub
SECOND LINE OF CODE:
Sub SaveMyWorkbook()
Dim strPath As String
Dim strFolderPath As String
strFolderPath = "C:\Documents and Settings\carl.walker\My Documents\Forms\"
strPath = strFolderPath & _
Sheet2.Range("b16").Value & " " & _
Sheet2.Range("f10").Value & ""
ActiveWorkbook.SaveAs Filename:=strPath
End Sub
Bookmarks