Private Sub recorddriver_Click()
Dim ws As Worksheet
Sheets("details").Unprotect Password:="Holden10"
Sheets("details").Select
Range("A4").Select
ActiveCell.Select
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col1
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
col1:
ActiveCell.Offset(1, 0).Select
ActiveCell.Select
If ActiveCell.Value = "columnend1" Then GoTo Col2 Else GoTo CoL12Next
CoL12Next:
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col1
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
Col2:
Range("D4").Select
ActiveCell.Select
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col2Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
col2Next:
ActiveCell.Offset(1, 0).Select
ActiveCell.Select
If ActiveCell.Value = "columnend2" Then GoTo Col3 Else GoTo Colm2nexT
Colm2nexT:
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col2Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
Col3:
Range("A51").Select
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col3Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
col3Next:
ActiveCell.Offset(1, 0).Select
ActiveCell.Select
If ActiveCell.Value = "columnend3" Then GoTo Col4 Else GoTo Colm3nexT
Colm3nexT:
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col3Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
Col4:
Range("D51").Select
ActiveCell.Select
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col4Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
col4Next:
ActiveCell.Offset(1, 0).Select
ActiveCell.Select
If ActiveCell.Value = "columnend4" Then GoTo Col5 Else GoTo Colm4nexT
Colm4nexT:
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col4Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
Col5:
Range("A100").Select
ActiveCell.Select
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col5Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
col5Next:
ActiveCell.Offset(1, 0).Select
ActiveCell.Select
If ActiveCell.Value = "columnend5" Then GoTo Col6 Else GoTo Colm5nexT
Colm5nexT:
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col5Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
Col6:
Range("D100").Select
ActiveCell.Select
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col6Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
col6Next:
ActiveCell.Offset(1, 0).Select
ActiveCell.Select
If ActiveCell.Value = "columnend6" Then GoTo Col7 Else GoTo Colm6nexT
Colm6nexT:
If ActiveCell.Value = "" Then ActiveCell.Value = UserForm3.driver.Value Else GoTo col6Next
ActiveCell.Offset(0, 1).Value = UserForm3.rego.Value
GoTo Col7
Col7:
Unload Me
Sheets("details").Protect Password:="Holden10"
UserForm1.Show
End Sub