braindiesel
Well-known Member
- Joined
- Mar 16, 2009
- Messages
- 571
- Office Version
- 365
- 2019
- 2010
- Platform
- Windows
I have a userform with 15 textboxes
If the textbox has a value then I want to run some code (newrowformulas) and then as a last step I want to put the value of the textbox in a cell.
Without knowing better, I will just repeat the code 15 times to check each box
If TextBox1.Value <> "" Then
NewRowFormulas
ActiveCell.Value = TextBox1.Value
End If
If TextBox2.Value <> "" Then
NewRowFormulas
ActiveCell.Value = TextBox2.Value
End If
etc
I suspect that there is a much easier way.
If you can help, I would appreciate it
If the textbox has a value then I want to run some code (newrowformulas) and then as a last step I want to put the value of the textbox in a cell.
Without knowing better, I will just repeat the code 15 times to check each box
If TextBox1.Value <> "" Then
NewRowFormulas
ActiveCell.Value = TextBox1.Value
End If
If TextBox2.Value <> "" Then
NewRowFormulas
ActiveCell.Value = TextBox2.Value
End If
etc
I suspect that there is a much easier way.
If you can help, I would appreciate it