rnicholsonaucoin
New Member
- Joined
- Jun 12, 2019
- Messages
- 2
Hi all,
I am new here and am self-taught (with the help of the internet of course) so my excel/ coding skills are not 100% perfect that is for sure.
I am creating a vba coded userform for work and for the most part I have it functioning... just not exactly how I need it to.
I have a userform (userform1) set up for a client to answer 13 questions, each answer is on a scale from 0-10, the 0-10 answers are optionbuttons.
I have it set up so each questions answer is entered into a cell (range o3
16), this works perfectly BUT each client is to fill this form out 4 times over the course of a couple months.
I need my form to decided where to enter each answer's value (here are my ranges o3
16, p3
16, q3:q16 and r3:r16)...
can someone give me a code that will make it so if o3 isempty=false then p3=value....(if o3 and p3 isempty= false then q3= value)...etc...
I have a total of 143 optionbuttons, so the code below is modified for each button based on value/cell placement...
here is the current code I am using:
Private Sub OptionButton10_Click()
If OptionButton10.value = True And IsEmpty(Range("o4")) = True Then
Range("o4") = "9"
End If
If OptionButton10.value = True And IsEmpty(Range("o4")) = False Then
Range("P4") = "9"
End If
If OptionButton10.value = True And IsEmpty(Range("o4")) = False And IsEmpty(Range("p4")) = False Then
Range("q4") = "9"
End If
If OptionButton10.value = True And IsEmpty(Range("o4")) = False And IsEmpty(Range("p4")) And IsEmpty(Range("Q4")) = False Then
Range("R4") = "9"
End If
If OptionButton10.value = False Then
' do nothing
End If
End Sub
Thanks in advance, can't wait to see what you have have for me!!
Randi
I am new here and am self-taught (with the help of the internet of course) so my excel/ coding skills are not 100% perfect that is for sure.
I am creating a vba coded userform for work and for the most part I have it functioning... just not exactly how I need it to.
I have a userform (userform1) set up for a client to answer 13 questions, each answer is on a scale from 0-10, the 0-10 answers are optionbuttons.
I have it set up so each questions answer is entered into a cell (range o3

I need my form to decided where to enter each answer's value (here are my ranges o3


can someone give me a code that will make it so if o3 isempty=false then p3=value....(if o3 and p3 isempty= false then q3= value)...etc...
I have a total of 143 optionbuttons, so the code below is modified for each button based on value/cell placement...
here is the current code I am using:
Private Sub OptionButton10_Click()
If OptionButton10.value = True And IsEmpty(Range("o4")) = True Then
Range("o4") = "9"
End If
If OptionButton10.value = True And IsEmpty(Range("o4")) = False Then
Range("P4") = "9"
End If
If OptionButton10.value = True And IsEmpty(Range("o4")) = False And IsEmpty(Range("p4")) = False Then
Range("q4") = "9"
End If
If OptionButton10.value = True And IsEmpty(Range("o4")) = False And IsEmpty(Range("p4")) And IsEmpty(Range("Q4")) = False Then
Range("R4") = "9"
End If
If OptionButton10.value = False Then
' do nothing
End If
End Sub
Thanks in advance, can't wait to see what you have have for me!!
Randi