Hi
I am quite new to excel formula's and i have been trying to find a resolution to this for some time, please help someone.
I am using a command button on page one and after filling all relative fields click the command button and all my data transfers to page 2 without any mistakes. I have titles above each column from A1 to Y1 and once i have clicked the command button my data is along the path A2 to Y2 with my cursor selected at A3 ready for the next row/data input.
This is where I have a problem, when i try to click the command button again the the data will not transfer onto A3 to Y3 instead the cursor selects cell A1
Can anyone please show me how I can keep inputting data on the row below each time i hit the command button. Please see my code below.
Private Sub Calendar1_Click()
ActiveCell.Value = Calendar1.Value
End Sub
Private Sub CommandButton1_Click()
Worksheets("sheet1").Select
Job = Range("A9")
Date = Range("A11")
Forename = Range("A13")
Surname = Range("B13")
Tel = Range("A15")
Mob = Range("B15")
moving = Range("A17")
Timeline = Range("A19")
Address = Range("A21")
Town = Range("A23")
County = Range("A25")
Postcode = Range("A27")
Country = Range("A29")
Details = Range("A31")
Forename1 = Range("A34")
Surname1 = Range("B34")
Tel1 = Range("A36")
Mob1 = Range("B36")
AddressTo = Range("A38")
Town = Range("A40")
County = Range("A42")
Postcode = Range("A44")
Country = Range("A46")
Details1 = Range("A48")
Worksheets("sheet2").Select
Worksheets("sheet2").Range("A1").Select
If Worksheets("sheet2").Range("A1").Offset(1, 0) <> "" Then
Worksheets("sheet2").Range("A1").End(x1down).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = Job
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Date
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Forename
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Surname
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Tel
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Mob
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = moving
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Timeline
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Address
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Town
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = County
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Postcode
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Country
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Details
ActiveCell.Offset(0, 2).Select
ActiveCell.Value = Forename
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Surname
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Tel1
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Mob1
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = AddressTo
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Town
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = County
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Postcode
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Country
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Details1
ActiveCell.Offset(1, -24).Select
Worksheets("sheet1").Select
Worksheets("sheet1").Range("A9").Select
End Sub
I am quite new to excel formula's and i have been trying to find a resolution to this for some time, please help someone.
I am using a command button on page one and after filling all relative fields click the command button and all my data transfers to page 2 without any mistakes. I have titles above each column from A1 to Y1 and once i have clicked the command button my data is along the path A2 to Y2 with my cursor selected at A3 ready for the next row/data input.
This is where I have a problem, when i try to click the command button again the the data will not transfer onto A3 to Y3 instead the cursor selects cell A1
Can anyone please show me how I can keep inputting data on the row below each time i hit the command button. Please see my code below.
Private Sub Calendar1_Click()
ActiveCell.Value = Calendar1.Value
End Sub
Private Sub CommandButton1_Click()
Worksheets("sheet1").Select
Job = Range("A9")
Date = Range("A11")
Forename = Range("A13")
Surname = Range("B13")
Tel = Range("A15")
Mob = Range("B15")
moving = Range("A17")
Timeline = Range("A19")
Address = Range("A21")
Town = Range("A23")
County = Range("A25")
Postcode = Range("A27")
Country = Range("A29")
Details = Range("A31")
Forename1 = Range("A34")
Surname1 = Range("B34")
Tel1 = Range("A36")
Mob1 = Range("B36")
AddressTo = Range("A38")
Town = Range("A40")
County = Range("A42")
Postcode = Range("A44")
Country = Range("A46")
Details1 = Range("A48")
Worksheets("sheet2").Select
Worksheets("sheet2").Range("A1").Select
If Worksheets("sheet2").Range("A1").Offset(1, 0) <> "" Then
Worksheets("sheet2").Range("A1").End(x1down).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = Job
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Date
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Forename
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Surname
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Tel
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Mob
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = moving
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Timeline
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Address
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Town
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = County
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Postcode
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Country
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Details
ActiveCell.Offset(0, 2).Select
ActiveCell.Value = Forename
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Surname
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Tel1
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Mob1
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = AddressTo
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Town
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = County
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Postcode
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Country
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Details1
ActiveCell.Offset(1, -24).Select
Worksheets("sheet1").Select
Worksheets("sheet1").Range("A9").Select
End Sub