Macro question

  • Thread starter Thread starter rmcove
  • Start date Start date
R

rmcove

I am trying to get my macro to delete unwanted tabs. The tabs are needed for
links, but after I break the links I want to delete the tabs so that the file
size will be minimal.

The problem is my macro works, but will not confirm the delete and I just do
not know the command needed.

Thanks,
rmcove
 
Is there an Application.DisplayAlerts = False line somewhere in your code?

If there is you can either remove it or set the False value to True.

If that's not the case I suggest you add another post to this thread with
your macro code in it, and for good measure indicate which version of Excel
you're using too.

Hope this helps...
 
Hi,

popUp = MsgBox("Are you sure you want to delete the Tab", vbYesNo +
vbQuestion, "MY POP-UP")
If popUp = vbYes Then
' your statement
Else
Exit Sub ' Quit the macro
End If
 
Here is the section from my macro


Sheets("MASTER INFO").Select
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.Delete


a window then pops up asking me to confirm the delete and I would like the
macro to have a line that confirms the delete/enter?
 
application.displayalerts=false
Sheets("MASTER INFO").delete
application.displayalerts=true

Hope this helps

Mike
 
Thank you Mike,

That worked great.

--
rmcove


Mike H said:
application.displayalerts=false
Sheets("MASTER INFO").delete
application.displayalerts=true

Hope this helps

Mike
 

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