Aretradeser
Board Regular
- Joined
- Jan 16, 2013
- Messages
- 176
- Office Version
- 2013
- Platform
- Windows
I use a UserForm with several controls for data entry to an Excel sheet.
In one of the columns of this sheet, I enter the values of 3 linked TextBoxes: the first 2 values (TextBox2 and TextBox3), separated by a blank space. The third value (TextBox1), separated from the value of TextBox2 by a ",". The issue is that between the TextBox3 value and the "," there is a blank space and I need it not to be like that; that is, the last letter of the TextBox3 value to be followed by the "," with no blank spaces.
The values of the 3 TextBoxes are text.
In one of the columns of this sheet, I enter the values of 3 linked TextBoxes: the first 2 values (TextBox2 and TextBox3), separated by a blank space. The third value (TextBox1), separated from the value of TextBox2 by a ",". The issue is that between the TextBox3 value and the "," there is a blank space and I need it not to be like that; that is, the last letter of the TextBox3 value to be followed by the "," with no blank spaces.
The values of the 3 TextBoxes are text.
VBA Code:
CODE:
With Worksheets("DATA")
t = Cells(Rows.Count, 2).End(xlUp).Row
Cells(t + 1, 2) = TextBox2 & " " & TextBox3 & ", " & TextBox1
Cells(t + 1, 3) = ComboBox5
Cells(t + 1, 4) = ComboBox6