Hi all, I'm trying to make a button click change all cell formulas on 5 different sheets to the cell values. The code I have below is perfect for the currently active sheet but I haven't had any success with specifying which sheets I want it to affect. Any help would be so greatly appreciated.
Sub button1_click_()
Dim answer As Integer
answer = MsgBox("Are you sure you want to finalize the results?", vbQuestion + vbYesNo, "THIS ACTION CANNOT BE UNDONE")
If answer = vbNo Then Exit Sub
Dim rng As Range
For Each rng In activesheet.UsedRange
If rng.HasFormula Then
rng.Formula = rng.Value
End If
Next rng
End Sub
Sub button1_click_()
Dim answer As Integer
answer = MsgBox("Are you sure you want to finalize the results?", vbQuestion + vbYesNo, "THIS ACTION CANNOT BE UNDONE")
If answer = vbNo Then Exit Sub
Dim rng As Range
For Each rng In activesheet.UsedRange
If rng.HasFormula Then
rng.Formula = rng.Value
End If
Next rng
End Sub