Hi guys,
This I'm sure will be the first of plethora of questions... After a little help if anyone can spare any.
I'm creating a bit of a data entry whereby you fill in the fields as you would in Userform textboxes and once "added" the transpose onto the sheet behind. The way it's been set up is that some of the textboxes are on different tabs of a tabpage control.
I'm sure I have the coding wrong but if the first tab nothing was entered, but something was entered in the 2nd or 3rd tab I want it to go to a new line. Instead, it's finding the first available cell and filling in from there.
here's a sample of the code that I think is causing the hassle:
any help would be greatley appreciated! Thanks again...
This I'm sure will be the first of plethora of questions... After a little help if anyone can spare any.
I'm creating a bit of a data entry whereby you fill in the fields as you would in Userform textboxes and once "added" the transpose onto the sheet behind. The way it's been set up is that some of the textboxes are on different tabs of a tabpage control.
I'm sure I have the coding wrong but if the first tab nothing was entered, but something was entered in the 2nd or 3rd tab I want it to go to a new line. Instead, it's finding the first available cell and filling in from there.
here's a sample of the code that I think is causing the hassle:
Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Understand")
'find first empty row in database
iRow = ws.Cells(Rows.Count) _
.End(xlUp).Offset(1, 0).Row
ws.Cells(iRow, 2).Value = Me.txtMr_s.Value
ws.Cells(iRow, 3).Value = Me.txtforename.Value
ws.Cells(iRow, 4).Value = Me.txtsurname.Value
ws.Cells(iRow, 5).Value = Me.txtpostcode.Value
any help would be greatley appreciated! Thanks again...