charlieb0y
New member
- Local time
- Today, 00:29
- Joined
- Dec 16, 2008
- Messages
- 2
Hi can someone please help. I have some code that finds the next empty row and inputs data from a form, which all works fine. But is there a way to tell it to ignore colums F to I when looking for the next empty row. As I want to populate these colums with data. When I run it now with data in those columns it finds the next empty row down from that data.
Many Thanks
Code:
Sub Update_Rows()
Dim NextRow As Integer
Dim CurrentRow As Object
'Update the database. Determine the first empty row.
NextRow = Sheets("sheet1").Range("A1").CurrentRegion.Rows.Count
Set CurrentRow = Sheets("sheet1").Range("A1").Offset(NextRow)
'Insert data from User Form
CurrentRow.Offset(0, 0) = frmISSQuote.tbSite.Text
CurrentRow.Offset(0, 1) = frmISSQuote.tbRefNumber.Text
CurrentRow.Offset(0, 2) = frmISSQuote.tbResource.Text
CurrentRow.Offset(0, 3) = frmISSQuote.tbRate.Text
CurrentRow.Offset(0, 4) = frmISSQuote.tbHours.Text
'CurrentRow.Offset(0, 5) =
'CurrentRow.Offset(0, 6) =
'CurrentRow.Offset(0, 7) =
'CurrentRow.Offset(0, 8) =
End Sub
Many Thanks