How to disable a Descriptive Statistics popup

Charli_Horse

New Member
Joined
Oct 11, 2017
Messages
1
Hi all I have the following code that I am using to generate a set of discriptive statistics for a set of random numbers by using the . However when I try to loop through the action of refreshing the data set there is a popup. "That says Descriptive Statistics - Output will overwrite existing data. Press ok to overwrite data in range, "then it refrences the range of my output" for example Sheet2!$D$1:$E$15".

Currently I am using the Application.DisplayAlerts=False outside of the loop, but for some reason the popup continues to show up. Any help would be awesome as i am trying to create something to use the statistics on parts but want to automate it for a large range of parts with the popup it will make this very time consuming.

Here is the Code that I have come up with so far. Thanks for any help you can provide.

Sub Stats()
'
' Stats Macro
' Refreshes the descriptive Statistics
Dim x As Integer

'Clears the old statistics
Worksheets("Sheet3").Range("A2:F100").Clear
'' Arbitrary number of iterations
Application.DisplayAlerts = False

For x = 2 To 11



Application.CalculateFull

'Recorded from macro recorder is what is not its popup with the message seems to supersede Application.Display alerts off

Application.Run "ATPVBAEN.XLAM!Descr", ActiveSheet.Range("$A$1:$A$30"), _
ActiveSheet.Range("$D$1"), "C", True, True



Worksheets("Sheet3").Cells(x, 1).Value = Round(Worksheets("Sheet2").Range("E3").Value, 2)
Worksheets("Sheet3").Cells(x, 2).Value = Round(Worksheets("Sheet2").Range("E4").Value, 2)
Worksheets("Sheet3").Cells(x, 3).Value = Worksheets("Sheet2").Range("E5").Value
Worksheets("Sheet3").Cells(x, 4).Value = Worksheets("Sheet2").Range("E6").Value
Worksheets("Sheet3").Cells(x, 5).Value = Round(Worksheets("Sheet2").Range("E7").Value, 2)
Worksheets("Sheet3").Cells(x, 6).Value = Round(Worksheets("Sheet2").Range("E8").Value, 2)
Worksheets("Sheet3").Cells(x, 9).Value = Worksheets("Sheet2").Range("E13").Value
'add in one standard Deviation
Worksheets("Sheet3").Cells(x, 7).Value = Worksheets("Sheet3").Cells(x, 1).Value + Worksheets("Sheet3").Cells(x, 5).Value
Worksheets("Sheet3").Cells(x, 8).Value = Worksheets("Sheet3").Cells(x, 1).Value + (Worksheets("Sheet3").Cells(x, 5).Value * 2)
Worksheets("Sheet3").Cells(x, 10).Value = Worksheets("Sheet3").Cells(x, 7).Value - Worksheets("Sheet3").Cells(x, 9).Value
Worksheets("Sheet3").Cells(x, 11).Value = Worksheets("Sheet3").Cells(x, 8).Value - Worksheets("Sheet3").Cells(x, 9).Value
'
If Worksheets("Sheet3").Cells(x, 10).Value < 0 Then
Worksheets("Sheet3").Cells(x, 12).Value = Round(Worksheets("Sheet3").Cells(x, 8).Value, 0)
ElseIf Worksheets("Sheet3").Cells(x, 10).Value > 0 Then
Worksheets("Sheet3").Cells(x, 12).Value = Round(Worksheets("Sheet3").Cells(x, 7).Value, 0)

End If


Next x

Application.DisplayAlerts = True

End Sub
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top