Good day all,
I am having trouble writing a macro that checks the value of an option button to change a string accordingly. The ActiveMonth variable is used to copy information across from one work sheet to another, with the worksheet depending on which of the option buttons is selected.
Code
Static ActiveMonth As String
ActiveSheet.Shapes("Option Button 286").Select
If ActiveSheet.Shapes("Option Button 286").Value = xlOn Then
ActiveMonth = "3rd of Month DD Donors"
Else: Range("K16").Select
End If
ActiveSheet.Shapes("15th").Select
If ActiveSheet.Shapes("15th").Value = xlOn Then
ActiveMonth = "15th of Month DD Donors"
Else: Range("K16").Select
End If
ActiveSheet.Shapes("22nd").Select
If ActiveSheet.Shapes("22nd").Value = xlOn Then
ActiveMonth = "22nd of Month DD Donors"
Else: Range("K16").Select
End If
Sheets(ActiveMonth).Select
etc...
Display More
'Object does not support this property or method' is the error i get. VB highlights the first If line.
All corrections will be welcomed, this is driving me up the wall!!
Thank you in advance.