savecopyas saves as file type
How about just adding .xls to your string?
MyNewFileName = Text1 & " " & Text3 & ".xls"
But since you're using .SaveCopyAs, it'll always be an exact copy--including the
format of the file.
Susan wrote:
Dim MyNewFileName As Variant
Dim Text1 As String
Dim Text3 As String
Text1 = "Program Status"
Text3 = "NEXT"
MyNewFileName = Text1 & " " & Text3
ActiveWorkbook.SaveCopyAs Filename:=MyNewFileName
above code works, but resulting file "Program Status
NEXT" is a "file" type, not an xls. however,
when double-clicking on it in windows explorer,
it does open with excel.
i tried replacing last statement with:
ActiveWorkbook.SaveCopyAs Filename:=MyNewFileName, _
FileFormat:=xlWorkbookNormal
but i get a "compile error......... named argument
not found".
any suggestions? TIA
susan
--
Dave Peterson
|