I will be adding hundreds of records to a data table via a user form and have a need for each new record to apply a certain value to a specfic column based on the values in two other cells / text boxes in the record to be added.
Requirement
If Value TextBox1 = Value TextBox2 then Value TextBox3 = A
If Value TextBox1 > Value TextBox2 then Value TextBox3 = B
If Value TextBox1 < Value TextBox2 then Value TextBox3 = C
I understand that I cannot apply a formula directly into TextBox3 in the User Form so I am looking for some VBA code that can be used to apply this calculated value to Column E for each new record, either by updating the User Form (perhaps by using AfterUpdate or some similar VBA command) or as part of the AddRecord Command.
I could apply the formula to each cell in Column E in advance but I do think this is the best option.
Thanks in advance
Requirement
If Value TextBox1 = Value TextBox2 then Value TextBox3 = A
If Value TextBox1 > Value TextBox2 then Value TextBox3 = B
If Value TextBox1 < Value TextBox2 then Value TextBox3 = C
I understand that I cannot apply a formula directly into TextBox3 in the User Form so I am looking for some VBA code that can be used to apply this calculated value to Column E for each new record, either by updating the User Form (perhaps by using AfterUpdate or some similar VBA command) or as part of the AddRecord Command.
I could apply the formula to each cell in Column E in advance but I do think this is the best option.
Thanks in advance