Deleting a workbook

  • Thread starter Thread starter JT
  • Start date Start date
J

JT

When my macro runs, a workbook is created that is used in
the rest of the macro. At the end, there is a blank
workbook that has been saved.

I have the path of the blank workbook in one variable and
the workbook name in another variable.

I would like to delete the blank workbook but any having
trouble getting the macro to delete it. Any suggestions
would be appreciated. Thanks.
 
Take a look at the Kill statement in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Or you can just use the Close command and have it ignore Display Alerts
and it just wont save the document.

I.e.:

Application.DisplayAlerts = False
ActiveWindow.Close
Application.DisplayAlerts = True


Give that a shot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top