ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro question (https://www.excelbanter.com/excel-discussion-misc-queries/223178-macro-question.html)

rmcove

Macro question
 
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

Kevin B

Macro question
 
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...
--
Kevin Backmann


"rmcove" wrote:

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


Eduardo

Macro question
 
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


"rmcove" wrote:

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


rmcove

Macro question
 
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?
--
rmcove


"Kevin B" wrote:

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...
--
Kevin Backmann


"rmcove" wrote:

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


Mike H

Macro question
 

application.displayalerts=false
Sheets("MASTER INFO").delete
application.displayalerts=true

Hope this helps

Mike



"rmcove" wrote:

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?
--
rmcove


"Kevin B" wrote:

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...
--
Kevin Backmann


"rmcove" wrote:

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


rmcove

Macro question
 
Thank you Mike,

That worked great.

--
rmcove


"Mike H" wrote:


application.displayalerts=false
Sheets("MASTER INFO").delete
application.displayalerts=true

Hope this helps

Mike



"rmcove" wrote:

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?
--
rmcove


"Kevin B" wrote:

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...
--
Kevin Backmann


"rmcove" wrote:

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



All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com