Hi All,
I have a userform that is copying entries into a log sheet. On the userform I have multiple fields that I am combining to place data in 1 cell on a worksheet. When I run my submit macro, I am recording the value labels from my code "mA L" and "mA R" even though I may not have any number value provided. ie, I didn't have a value on the userform.
I was hoping someone may be able to help me prevent the value labels from being passed on to the logsheet, if no number value accompanies it. I have a total of 12 possible entires. I may have 4 on the left, 3 on the right as an example.
Ideally, it should look something like this:
L2 12mA L, L2 20mA R
L4 23mA L
L5 15mA L, L5 25mA R
S1 20mA L, S1 14 mA R
Here is my code that brings it to my logsheet. Just not sure quite how to block the labels from coming over with no number value. I would imagine each line would need to be evaluated individually.
Thank you for what assistance you may be able to provide.
Patrick
I have a userform that is copying entries into a log sheet. On the userform I have multiple fields that I am combining to place data in 1 cell on a worksheet. When I run my submit macro, I am recording the value labels from my code "mA L" and "mA R" even though I may not have any number value provided. ie, I didn't have a value on the userform.
I was hoping someone may be able to help me prevent the value labels from being passed on to the logsheet, if no number value accompanies it. I have a total of 12 possible entires. I may have 4 on the left, 3 on the right as an example.
Ideally, it should look something like this:
L2 12mA L, L2 20mA R
L4 23mA L
L5 15mA L, L5 25mA R
S1 20mA L, S1 14 mA R
Here is my code that brings it to my logsheet. Just not sure quite how to block the labels from coming over with no number value. I would imagine each line would need to be evaluated individually.
Code:
Cells(erow, 23) = cb_level1.Text & " " & tb_level1l.Text & "mA L" & ", " & cb_level1.Text & " " & tb_level1r.Text & "mA R" & vbCrLf _
& cb_level2.Text & " " & tb_level2l.Text & "mA L" & ", " & cb_level2.Text & " " & tb_level2r.Text & "mA R" & vbCrLf _
& cb_level3.Text & " " & tb_level3l.Text & "mA L" & ", " & cb_level3.Text & " " & tb_level3r.Text & "mA R" & vbCrLf _
& cb_level4.Text & " " & tb_level4l.Text & "mA L" & ", " & cb_level4.Text & " " & tb_level4r.Text & "mA R" & vbCrLf _
& cb_level5.Text & " " & tb_level5l.Text & "mA L" & ", " & cb_level5.Text & " " & tb_level5r.Text & "mA R" & vbCrLf _
& cb_level6.Text & " " & tb_level6l.Text & "mA L" & ", " & cb_level6.Text & " " & tb_level6r.Text & "mA R"
Thank you for what assistance you may be able to provide.
Patrick