I am working on hard coding a file, SaveCopyAs
, and then changing the active workbook to the newly created file so i can mail out the file without any formulas, etc. later on in the code.
I have tried Workbook.Activate but cant seem to get the correct file from my own code.
Thanks for the help!
Sheets("Send").Visible = True
Sheets.Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Paste
Application.CutCopyMode = False
Dim thisWb As Workbook, d As Integer
Set thisWb = ActiveWorkbook
d = InStrRev(thisWb.FullName, ".")
'ActiveWorkbook.SaveAs Filename:=Left(thisWb.FullName, d - 1) & "-Prelims" &
Mid(thisWb.FullName, d)
Sheets("Send").Visible = False
ActiveWorkbook.SaveCopyAs Filename:=Left(thisWb.FullName, d - 1) & "- Prelims" & Mid(thisWb.FullName, d)
ActiveWorkbook.Close savechanges:=False