#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Macro prompt

Hi,

I have a macro that creates a new worksheet, deletes 2 tabs, then closes the
worksheet.

When I run the macro there are 2 prompts,
1-do you want to delete the sheets
2-do you want to save the worksheet.

Is there a way to turn this off so the macro runs more smoothly?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Macro prompt

Hi Jeff,

Insert
Application.DisplayAlerts = False
before and
Application.DisplayAlerts = True
after line deleting sheets (tabs as you call them), and

ActiveWorkbook.Save
before line closing the workbook (not worksheet).

Regards,
Stefi

€˛Jeff€¯ ezt Ć*rta:

Hi,

I have a macro that creates a new worksheet, deletes 2 tabs, then closes the
worksheet.

When I run the macro there are 2 prompts,
1-do you want to delete the sheets
2-do you want to save the worksheet.

Is there a way to turn this off so the macro runs more smoothly?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Macro prompt


Jeff wrote:

Hi,

I have a macro that creates a new worksheet, deletes 2 tabs, then closes the
worksheet.

When I run the macro there are 2 prompts,
1-do you want to delete the sheets
2-do you want to save the worksheet.

Is there a way to turn this off so the macro runs more smoothly?

Thanks!


To close a workbook without being prompted to save
Windows("NAME.xls").Close saveChanges:=False

Funnily enough I was just about to ask how to close tabs without the
save prompt!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM
How to CANCEL file SAVE PROMPT when MACRO is running? Stuart Macro Muppet Excel Discussion (Misc queries) 3 August 11th 05 12:26 PM
How do I insert a prompt into an Excel macro? TangoHammer Excel Discussion (Misc queries) 1 August 4th 05 09:31 PM
Prompt for file name in a macro Louisville Cardinals Excel Discussion (Misc queries) 11 April 19th 05 02:39 PM


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"