Hi all,
Problem 1:
I am trying to delete a sheet within a workbook, as part of macro. Here's the code:
Sub DeleteInstructions()
'
' DeleteInstructions Macro
' Macro recorded 3/13/2007 by Gary Beckwith
'
'
Sheets("INSTRUCTIONS").Select
ActiveWindow.SelectedSheets.Delete
Sheets("DATA").Select
End Sub
When I run it, I get the prompt "Data may exist in the sheet for deletion. To permanently delete the data, press delete." I have to click OK. How can I get the macro to do this for me
Problem 2:
I have just sorted and then copied text from another file into this one. I want to go back to that file I just sorted and save and close it. Here's the code:
Sub CloseOtherFile()
'
' CloseOtherFile Macro
' Macro recorded 3/13/2007 by Gary Beckwith
ActiveWindow.ActivateNext
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
It goes to close it, but then asks if I want to save it. How can I get the macro to do this for me
Thank you,
Gary