Hi All,
Really need your help as I just cant get this to work.... Wanting to type a weight into cell C6, then I have a command button that copies the cell, transfers it to the bottom of a table in a different sheet and then deletes the value from the original cell....
Id love it if after typing the value in C6, all I had to do was press Enter and it would be like pressing the command button.
My code currently looks like this:
Any ideas?
Really need your help as I just cant get this to work.... Wanting to type a weight into cell C6, then I have a command button that copies the cell, transfers it to the bottom of a table in a different sheet and then deletes the value from the original cell....
Id love it if after typing the value in C6, all I had to do was press Enter and it would be like pressing the command button.
My code currently looks like this:
VBA Code:
Private Sub CommandButton1_Click()
Dim Customername As String, Customerphone As String
Worksheets("sheet1").Select
Customername = Range("C6")
Worksheets("sheet2").Select
Worksheets("sheet2").Range("A1").Select
If Worksheets("sheet2").Range("A1").Offset(1, 0) <> "" Then
Worksheets("sheet2").Range("A1").End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = Customername
Worksheets("sheet1").Select
Worksheets("Sheet1").Range("C6").ClearContents
Worksheets("sheet1").Range("C6").Select
End Sub
Any ideas?
Last edited by a moderator: