Good day,
A request for help from a complete newbie!
I have a questionnaire that I have created a User Form for. Creating the user form went well but I am now stuck trying to code the answers to cells in the database.
I have managed to get the code right for the first 8 questions as they all use a text box field:
However, my next question (question 9) requires an Option Box field for "Weather", with the options being:Private Sub CommandButton13_Click() erow = Sheets("Database").Range("a" & Rows.Count).End(xlUp).Row Range("a" & erow + 1) = TextBox1.Value Range("b" & erow + 1) = ComboBox1.Value Range("c" & erow + 1) = ComboBox2.Value Range("d" & erow + 1) = TextBox59.Value Range("e" & erow + 1) = TextBox60.Value Range("f" & erow + 1) = TextBox61.Value Range("g" & erow + 1) = TextBox2.Value Range("h" & erow + 1) = OptB_Male.Value End Sub
1 (Good)
2 (Fair)
3 (Bad)
I need the answer, whether it be 1, 2 or 3, to be placed into column "i" in my excel database (the worksheet is named "Database").
I have googled extensively and watched many video tutorials, but I cannot understand how to do it. My form makes use of many option boxes so I need to understand the code in order to modify the code for the other questions.
I will be using the User Form, on a tablet, to carry out multiple surveys. I have a "submit" button that sends the inputted data input to my "Database" worksheet.
Please help this Novice learn (and understand) new tricks