I have a main workbook that contains a funding request blank worksheet - like a template -and the remaining worksheets in the book are filled in funding requests.
When I fill out a new request I want to email just the new sheet and save a copy to the end of the main workbook. I no longer need the temporary copy that I email because I'm going to have a copy at the end of the main workbook. I drafted up this code which works for the most part as far as sending a copy - it does work but it also generates a Run-time error '53': File not found - I presume from killing the temporary file.
My question is, "How do I eliminate this error box from displaying?"
Thanks in advance!
Sub SendOneSheet()
Dim Filename As String
Filename = InputBox("Please name the file ")
ActiveWorkbook.Worksheets.Copy
ActiveWorkbook.SaveAs Filename
ActiveWorkbook.SendMail "micael.jon1.ctr@navy.mil", InputBox("Please type subject")
ActiveWorkbook.Close False
Kill Filename
End Sub
Bookmarks