I'm trying to assign this macro script to a button. So when I press it, it finds the selected radiobutton, copys the value of the relevant cell and pastes (paste special) it into another..
It gives this error: "run time error '438' object doesn't support this property or method"
Any ideas?
Thanks
Code:
Sub copy1()
'
' copy1 Macro
'
If ActiveSheet.OptionButton25.Value Then
Range("J16").Select
Application.CutCopyMode = False
Selection.Copy
Range("G10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If ActiveSheet.OptionButton26.Value Then
Range("J17").Select
Application.CutCopyMode = False
Selection.Copy
Range("G10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If ActiveSheet.OptionButton27.Value Then
Range("J18").Select
Application.CutCopyMode = False
Selection.Copy
Range("G10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If ActiveSheet.OptionButton28.Value Then
Range("J19").Select
Application.CutCopyMode = False
Selection.Copy
Range("G10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Else
TextBox7.ForeColor = vbBlack
TextBox7.Font.Bold = True
End If
End If
End If
End If
End Sub
It gives this error: "run time error '438' object doesn't support this property or method"
Any ideas?
Thanks