View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ariel Ariel is offline
external usenet poster
 
Posts: 38
Default disabling message

I am writing a macro that loops through the the Excel "Regression Macro"
several times. Because I want the output to replace the existing output (from
the prior loop), I get a message to the effect "Press OK to override existing
data".

How can I disable this message? I tried "Application.DisplayAlerts = False"
but it doesn't work.

Sub TestBSBeta()
'
Dim Time

Time = 0

Do Until Time = 10

Application.Run "ATPVBAEN.XLA!Regress",
ActiveSheet.Range("$H$1:$H$31"), _
ActiveSheet.Range("$J$1:$L$31"), False, True, ,
ActiveSheet.Range("$N$1") _
, False, False, False, False, , False

Application.DisplayAlerts = False


Range("O20").Select
Selection.Copy

Range("O24").Select
ActiveSheet.Paste

Time = Time + 1
Loop

End Sub