I want it to create a new workbook containing a copy of the sheet selected (sSheetName). And for the saveAs box to come up automatically with the filename populated with the code below:
[VBA]
filename = Range("D3").Value
filename = Mid(filename, InStr(filename, " ") + 1) & " " & _
Left(filename, InStr(filename, " ") - 1) & _
", CONTRACT, " & Format(Range("G9").Value, "dd.mm.yy")
filename = Application.GetSaveAsFilename(filename, "Microsoft Excel Files (*.xls), *.xls")
If filename <> False Then
ActiveWorkbook.SaveAs filename
End If
[/VBA]
The cells it would be getting the information from would be from the original workbook on a sheet called INPUT.
Yes actually it is working now, but i can see you have made the filename default to the name of the sheet. This is not what i want. Also if i press cancel i get a runtime error as it seems to be going through all the subs in my other workbook?
Thanks for any help.....