In the simple macro below, I use a button to copy some formulas and save as values. This works great in 2000. My problem is, the page is copied from a hidden page, and when I run in '97 the copied button is renamed and therefore has no code behind it. Is there a way to make this work on both versions?
Private Sub BudgCreate_Click()
Range("H10").Select
ActiveCell.FormulaR1C1 = "=R[-3]C[-4]"
Range("H11").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-4]"
Range("H12").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-5]"
Range("H10:H12").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("I16").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-5]/12"
Range("I16").Select
Selection.Copy
Range("I17:I51").Select
ActiveSheet.Paste
Range("I16:I51").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
End Sub
Private Sub BudgCreate_Click()
Range("H10").Select
ActiveCell.FormulaR1C1 = "=R[-3]C[-4]"
Range("H11").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-4]"
Range("H12").Select
ActiveCell.FormulaR1C1 = "=R[1]C[-5]"
Range("H10:H12").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("I16").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-5]/12"
Range("I16").Select
Selection.Copy
Range("I17:I51").Select
ActiveSheet.Paste
Range("I16:I51").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
End Sub