I have a simple recorded macro to eliminate some mouse travel and keystrokes when deleting a worksheet named "Proposal Backup".
When I recorded the macro a message box popped up that states "Microsoft Excel will permanently delete this sheet. Do you want to continue?". It has a "Delete" and "Cancel" button with the "Delete" button highlighted.
During the recording process I Hit "Enter" on the Keyboard and this deleted the sheet. The problem I have is, the "Enter" does not get recorded so I have to do this every time I run the macro. Is there a way to make that part of the macro and eliminate having to strike the "Enter" key.
When I recorded the macro a message box popped up that states "Microsoft Excel will permanently delete this sheet. Do you want to continue?". It has a "Delete" and "Cancel" button with the "Delete" button highlighted.
During the recording process I Hit "Enter" on the Keyboard and this deleted the sheet. The problem I have is, the "Enter" does not get recorded so I have to do this every time I run the macro. Is there a way to make that part of the macro and eliminate having to strike the "Enter" key.
VBA Code:
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Proposal Backup").Select
ActiveWindow.SelectedSheets.Delete
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1