Hi everyone!
Please can someone help me out with the following:
There are 29 option buttons in a group box, and each option button activates a macro when selected. The option buttons are placed in collum V. The user can put data in the cell next tot it in collum W.
The code will put a timestamp in cell U55 and the value of the cell next to the option button, collum W, in cell V55.
Now I am assigning a new macro to every individual option button (232 in total...), and paste the above code and change it into the next cell vallue. Is there any way to make this macro apply for this group of option buttons?
Also i'm wondering if it's possible to change the vbOKOnly into vbYesNo, with when vbNo is selected the last checked option button is selected, in stead of the new one clicked. And proceed the above code when vbYes.
Thanks in advance,
D_C_X
Please can someone help me out with the following:
There are 29 option buttons in a group box, and each option button activates a macro when selected. The option buttons are placed in collum V. The user can put data in the cell next tot it in collum W.
The code will put a timestamp in cell U55 and the value of the cell next to the option button, collum W, in cell V55.
Code:
Sub OptionButton145_Klikken()
response = MsgBox("Key given to " & Range("W23").Value & "", vbOKOnly)
Application.Range("U55") = Now()
Application.Range("V55") = "Key given to " & Range("W23").Value & ""
Activeworkbook.Save
End Sub
Now I am assigning a new macro to every individual option button (232 in total...), and paste the above code and change it into the next cell vallue. Is there any way to make this macro apply for this group of option buttons?
Also i'm wondering if it's possible to change the vbOKOnly into vbYesNo, with when vbNo is selected the last checked option button is selected, in stead of the new one clicked. And proceed the above code when vbYes.
Thanks in advance,
D_C_X