I am working with a UserForm that has three sets of twenty TextBoxs that represent three different inputs that I will need for my spreadsheet.
I would like to create a For...Next Loop that will look at each one and check a value in the spreadsheet, if the number of the TextBox is not greater than the number in the cell then the TextBox value is changed to "N/A"
Code should be:
Private Sub CheckInputs()
For i = 1 to 20
If ActiveSheet.Range("C40").Value < 1 Then InputTable.txt1.Value = "N/A"
Next i
End Sub
**How do I replace the "1" in [Value < 1] and [txt1] with "i"?**
Thanks,
Jacob
I would like to create a For...Next Loop that will look at each one and check a value in the spreadsheet, if the number of the TextBox is not greater than the number in the cell then the TextBox value is changed to "N/A"
Code should be:
Private Sub CheckInputs()
For i = 1 to 20
If ActiveSheet.Range("C40").Value < 1 Then InputTable.txt1.Value = "N/A"
Next i
End Sub
**How do I replace the "1" in [Value < 1] and [txt1] with "i"?**
Thanks,
Jacob