vanhunk
08-19-2018, 06:18 AM
Output range will overwrite existing data. Press OK to overwrite data in range :...
I am using the Sampling Analysis tool in Excel to select random numbers and wrote a macro to automate the updating of the selection. Unfortunately I have to press OK every-time to accept the overwriting of the previous selection.
I am trying to stop this message and to get the overwriting to happen without my intervention.
None of the methods or suggestions I could find solved this particular problem.
That includes:
Application.AlertBeforeOverwriting = False
or
Application.DisplayAlerts = False
or
Application.SendKeys "{ENTER}"
My code:
Sub RandSelectDA()
With Application
.Run "ATPVBAEN.XLAM!Sample", ActiveSheet.Range("EntryNo"), _
ActiveSheet.Range("WinnerNo"), "R", 5
End With
End Sub
See attached spreadsheet.
I would really appreciate a solution, if it exists, for this one.
Best Regards,
vanhunk
I am using the Sampling Analysis tool in Excel to select random numbers and wrote a macro to automate the updating of the selection. Unfortunately I have to press OK every-time to accept the overwriting of the previous selection.
I am trying to stop this message and to get the overwriting to happen without my intervention.
None of the methods or suggestions I could find solved this particular problem.
That includes:
Application.AlertBeforeOverwriting = False
or
Application.DisplayAlerts = False
or
Application.SendKeys "{ENTER}"
My code:
Sub RandSelectDA()
With Application
.Run "ATPVBAEN.XLAM!Sample", ActiveSheet.Range("EntryNo"), _
ActiveSheet.Range("WinnerNo"), "R", 5
End With
End Sub
See attached spreadsheet.
I would really appreciate a solution, if it exists, for this one.
Best Regards,
vanhunk