Still Need more help
The code is still carrying over the complete row from Sheet1 to sheet2 to limit the Rows to only tranfer column A,B,C,D,E,F.......
When I w-click on A now it sends all of the row and replaces everything after column F....which is data I need to keep
all is good with your code except for this problem.
To refresh your mind ..every time I w-click on any A on sheet1 it should send that row to sheet2 (and it does)
I need to stop it from send anything else but B,C,D,E,F......
Sorry Just let me know when you get tired of this....
Thanks
James
Automatically copy entire row
-
-
-
Includes A also A,B,C,D,E,F
-
Hi,
If you want data in col. A, B, C, D, E and F on Sheet1 to be transferred to sheet2, the code should do it already.
Have you replaced the code? I mean have you overwrite the code?
You need to delete the old code and paste the new code to the same place.
If you do so, it never work like old one.As you see in the code
.Resize(, 6).Copy Destination:= _
ws2.Range("a17")is carry the data only from col. A to F.
Try copy the latest code again and replace the code.
jindon
-
Jindon, This is what I have in VBA ...It works the way it should, except for the part of going past column F
I can,t see where the problem is and its at this point..Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim ws2 As Worksheet
Set ws2 = Sheets("Sheet2")
With Target
If .Column <> 1 Then Exit Sub
.Resize(, 6).Copy Destination:= _
ws2.Range("a17")
End With
Set ws2 = Nothing
End Sub -
I don't understand why it doesn't work.
The attached has the code and totally blank 2 sheets.
Copy all the data in your worksheets and paste to the attached and try.hope it works this time.
jindon
-
-
Rollin
You are the best.........Yours works , I don't were my error is.
Thanks again for all your great work
James -
Jindon.. Sorry
I spoke to soon........the F problem is solved.....now I am back to the problem were it only goes to A 17 on top of what is previously there.
How do we make it that each click sends it to the next line as it was before -
Jindon.. Sorry (I keep calling you Rollin)
I spoke to soon........the F problem is solved.....now I am back to the problem were it only goes to A 17 on top of what is previously there.
How do we make it that each click sends it to the next line as it was before -
Is this still going?
Code
Display MorePrivate Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim ws2 As Worksheet, lastA As Long Set ws2 = Sheets("Sheet2") If WorksheetFunction.CountA(ws2.Range("a:a")) = 0 Then lastA = ws2.Cells(1, 1) Else lastA = ws2.Range("a65536").End(xlUp).Row End If With Target If .Column <> 1 Then Exit Sub .Resize(, 6).Copy Destination:= _ ws2.Cells(lastA + 1, 1) End With Set ws2 = Nothing End Sub
-
Jindon
This time I can say thank you for everything, you really help me out
All is working the way I need it to thanks to you, Sorry it took up so much of your time.
Talk to you again, next ....only if you don't mind
Thanks James -
-
HI, James
I'm so glad that you've got what you desired.
I'll talk to you again next time.All the best,
jindon
-
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!