First blank cell

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 ***
 
B

Bob Phillips

Something like

ictl = Activeworkbook.Worksheets("Sheet1").End(xlDown).Row + 1

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top