Hi All,
I have a reset macro here, that is working great. I only have one problem with it and i cannot seem to find a solution. My problem is that when i run this reset macro it is clearing all the contents that the user has inputed into this workbook, it is displaying the message boxes that are on the other pages of my workbook. On the pages "Loss Development Factors" and "Claim Count - Credibility" i have message boxes that pop up when the user opens the page that tell the user to only paste values on this sheet. when my reset macro is running for some reason it is popping those boxes up and i have to click okay a couple of times to keep the macro going. I think there may be something i have to do on the other pages but here is my reset macro along with one of the pages that shows a message box. The other page is exactly the same. I am a VBA newbie so if you could please explain a solution in pretty good detail so i can understand it. Thanks in advance for all of the help.
Here is the reset macro
Sub ResetWorkbook2()
' ResetWorkbook Macro
' This macro will reset your workbook
Application.ScreenUpdating = False
Range("A8").FormulaR1C1 = "Rate Indication"
With Sheets("Loss Development Factors")
.Range("B3:U22").ClearContents
.Range("B52").FormulaR1C1 = "=MEDIAN(R[-7]C:R[-2]C)"
.Range("B52").AutoFill Destination:=.Range("B52:T52"), Type:=xlFillDefault
.Select
.Range("B3").Select
End With
With Sheets("Claim Count - Credibility")
.Range("B3:U22").ClearContents
.Select
.Range("B3").Select
End With
With Sheets("Rate Indication Instructions")
.Range("N28:O53").ClearContents
.Range("Q37").ClearContents
.Range("I20").ClearContents
.Range("I15").ClearContents
.Range("I14").ClearContents
.Range("I13").ClearContents
.Range("I11").ClearContents
.Range("I10").ClearContents
.Range("I9").ClearContents
.Range("I8").ClearContents
.Select
.Range("C56").Select
.Range("I8").Select
.Range("C37:C56").Cells.ClearContents
End With
With Sheets("Summary & Results")
.Range("P32").FormulaR1C1 = "=R[-4]C"
'ActiveCell.FormulaR1C1 = "=R[-4]C"
End With
With Sheets("Selection")
.Range("A8").FormulaR1C1 = "Loss Ratio Projection"
End With
With Sheets("Loss Ratio Proj Instructions")
.Range("P22:Q47").ClearContents
.Range("S31").ClearContents
.Range("I14").ClearContents
.Range("I13").ClearContents
.Range("I11").ClearContents
.Range("I10").ClearContents
.Range("I9").ClearContents
.Range("I8").ClearContents
.Select
.Range("C52").Select
.Range("I8").Select
.Range("C33:C52").ClearContents
End With
With Sheets("Selection")
.Range("A8").FormulaR1C1 = ""
End With
Application.ScreenUpdating = True
End Sub
Here is the pop up box that is on both of the pages listed above
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
MsgBox "When you copy and paste into this sheet, please only paste values."
End Sub
Bookmarks