PC Review


Reply
Thread Tools Rate Thread

disabling message

 
 
Ariel
Guest
Posts: n/a
 
      24th Feb 2008
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
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      24th Feb 2008
Here's one way:


Range("O20").Copy
Range{"O24").ClearContents
Range("O24").Paste





"Ariel" wrote:

> 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

 
Reply With Quote
 
Ariel
Guest
Posts: n/a
 
      24th Feb 2008
Excellent! It worked very nicely. Thank you!

"JLGWhiz" wrote:

> Here's one way:
>
>
> Range("O20").Copy
> Range{"O24").ClearContents
> Range("O24").Paste
>
>
>
>
>
> "Ariel" wrote:
>
> > 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
disabling macro message Erol Microsoft Excel Programming 0 26th May 2009 02:26 PM
Disabling the 'From' option within New Message vex Microsoft Outlook 1 15th Jun 2006 03:57 PM
disabling a message box =?Utf-8?B?dGltbXVsbGE=?= Microsoft Excel Programming 10 25th Jul 2005 05:47 PM
Disabling error message =?Utf-8?B?U2VyZ2VqIEx1a292aWM=?= Windows XP Help 1 11th Mar 2005 11:09 AM
Disabling welcome message Terry Microsoft Outlook Discussion 0 5th Apr 2004 12:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:16 AM.