Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Skip Override Prompt in Macro


I have a histogram macro that I am trying to run, but I receive a prompt that
says something like "output range will overwrite existing data. Press OK to
overwrite data in range..." The window displays the "OK" button, "Cancel",
and "Help". How do I have the macro shut this off or power through this
automatically? PS: The macro runs 20 histograms sequentially.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Skip Override Prompt in Macro


Maybe

application.displayalerts = false

code to run

application.displayalerts = true


Gord Dibben MS Excel MVP

On Thu, 25 Jun 2009 13:20:02 -0700, iperlovsky
wrote:

I have a histogram macro that I am trying to run, but I receive a prompt that
says something like "output range will overwrite existing data. Press OK to
overwrite data in range..." The window displays the "OK" button, "Cancel",
and "Help". How do I have the macro shut this off or power through this
automatically? PS: The macro runs 20 histograms sequentially.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Skip Override Prompt in Macro


For a more general solution, there is always "Tools/Options.../Edit", "Alert
before overwriting cells" (uncheck the box).

Eric

"iperlovsky" wrote:

I have a histogram macro that I am trying to run, but I receive a prompt that
says something like "output range will overwrite existing data. Press OK to
overwrite data in range..." The window displays the "OK" button, "Cancel",
and "Help". How do I have the macro shut this off or power through this
automatically? PS: The macro runs 20 histograms sequentially.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Skip Override Prompt in Macro


I tried this but it did not work. Maybe it has to do with the alert type:
overwrite existing cells. Any ideas? Here is some of the code:

Sub Histo()
Application.DisplayAlerts = False
Application.Run "ATPVBAEN.XLA!Histogram", ActiveSheet.Range("_01"),
ActiveSheet.Range("$FV$34"), _ , False, False, False, False
Application.Run "ATPVBAEN.XLA!Histogram", ActiveSheet.Range("_02"),
ActiveSheet.Range("$FX$34"), _ , False, False, False, False
Application.DisplayAlerts = True
End Sub


"Gord Dibben" wrote:

Maybe

application.displayalerts = false

code to run

application.displayalerts = true


Gord Dibben MS Excel MVP

On Thu, 25 Jun 2009 13:20:02 -0700, iperlovsky
wrote:

I have a histogram macro that I am trying to run, but I receive a prompt that
says something like "output range will overwrite existing data. Press OK to
overwrite data in range..." The window displays the "OK" button, "Cancel",
and "Help". How do I have the macro shut this off or power through this
automatically? PS: The macro runs 20 histograms sequentially.



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
Override a built-in command with a macro Robert Schwenn Excel Programming 1 November 24th 08 08:28 PM
Override prompt for Office Clipboard Brent E Excel Discussion (Misc queries) 3 October 14th 08 07:30 PM
How to skip save prompt ask me if I want to replace File. Viviana Excel Programming 1 August 16th 06 07:24 AM
How to skip save prompt ask me if I want to replace File. Viviana Excel Programming 1 August 16th 06 03:45 AM
Macro override password protection Cheryl Excel Programming 1 June 15th 04 03:08 AM


All times are GMT +1. The time now is 04:59 AM.

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

About Us

"It's about Microsoft Excel"