Hi,
I have 2 options and 1 textbox on the suerform, user can chose options or manually enter the data into the textbox, and all the value will be transferred to a same cell H3, here is how I want it to work.
If none of the options selected or no date entered in textbox then popup a messagebox says "Please enter/chose your name?",
If one of the options selected and no data entered in textbox then transfer option value to cell H3,
If none of the options selected but data entered in textbox then transfer the textbox data to cell H3,
If one of the options selected and data entered in textbox then only transfer the textbox data to cell H3.
Thank you in advance.
Ed
![]()
Private Sub OkButton_Click() If OptionButton2 Then Range("H3") = "Peter" If OptionButton3 Then Range("H3") = "Matt" End If Range("H3") = TextBox1.Text End Sub
Bookmarks