I'm trying to program a Command button in Excel VBA that can call on specific macros based on the string value of a cell. I thought I can just use conditional "if" statements, but there is a bug in the program.
For example, so far I have:
Private Sub CommandButton1_Click()
If Range("F3").Select = "Retirement Age" Then
Call NewRA
End If
End Sub
And I want the Button to run the macro named "NewRA" when Cell F3 equals "Retirement Age". How can I write the code appropriately to this? Thanks in advance.