A
Axel
I have made a userform that return back values from a sheet, and is
textboxes to give new values to the same sheet.
My problem is to make the textbox3 (Last line) to choose the first blank
cell to the right each time i open the userform.
Any suggestions?
Thanks
Private Sub ComboBox1_Change()
Dim iCtr As Integer
ictl = ComboBox1.Value
UserForm1.Label1 = Sheet2.Range("B" & CStr(2 + ictl))
UserForm1.Label17 = Sheet2.Range("C" & CStr(2 + ictl))
UserForm1.Label4 = Sheet1.Range("B" & CStr(2 + ictl))
UserForm1.Label5 = Sheet1.Range("D" & CStr(2 + ictl))
UserForm1.Label6 = Sheet1.Range("E" & CStr(2 + ictl))
UserForm1.Label13 = Sheet1.Range("C" & CStr(2 + ictl))
TextBox1.Text = Sheet2.Range("C" & CStr(2 + ictl))
TextBox2.Text = Sheet2.Range("D" & CStr(2 + ictl))
TextBox3.Text = Sheet2.Range("E" & CStr(2 + ictl +
Cells(Columns.Count).End(xlToLeft)(2, 1)))
*** Sent via Developersdex http://www.developersdex.com ***
textboxes to give new values to the same sheet.
My problem is to make the textbox3 (Last line) to choose the first blank
cell to the right each time i open the userform.
Any suggestions?
Thanks
Private Sub ComboBox1_Change()
Dim iCtr As Integer
ictl = ComboBox1.Value
UserForm1.Label1 = Sheet2.Range("B" & CStr(2 + ictl))
UserForm1.Label17 = Sheet2.Range("C" & CStr(2 + ictl))
UserForm1.Label4 = Sheet1.Range("B" & CStr(2 + ictl))
UserForm1.Label5 = Sheet1.Range("D" & CStr(2 + ictl))
UserForm1.Label6 = Sheet1.Range("E" & CStr(2 + ictl))
UserForm1.Label13 = Sheet1.Range("C" & CStr(2 + ictl))
TextBox1.Text = Sheet2.Range("C" & CStr(2 + ictl))
TextBox2.Text = Sheet2.Range("D" & CStr(2 + ictl))
TextBox3.Text = Sheet2.Range("E" & CStr(2 + ictl +
Cells(Columns.Count).End(xlToLeft)(2, 1)))
*** Sent via Developersdex http://www.developersdex.com ***