Overwriting data during transfer

Solved/Closed
MUKUL_1308 Posts 8 Registration date Friday June 15, 2018 Status Member Last seen July 5, 2018 - Updated on Jun 21, 2018 at 06:39 PM
MUKUL_1308 Posts 8 Registration date Friday June 15, 2018 Status Member Last seen July 5, 2018 - Jul 2, 2018 at 12:42 AM
Sir,
I had created vba code to transfer data from one workbook to another. it's working 1st time . but second time when I'm tapping the command button to transfer data it is overwriting the previous saved data. I want that when tap on command button it should submit data in the next empty row during each transfer.
Please help me for this problem.
Related:

2 responses

Blocked Profile
Jun 21, 2018 at 08:32 PM
Add 1 to the variable if the variable is greater than 1!
1
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Updated on Jun 26, 2018 at 12:01 PM
Hi Mukul,

To find the first available row:
Dim lRow as integer
lRow=Range("A"&rows.count).end(xlup).offset(1,0).row

Best regards,
Trowa
1
MUKUL_1308 Posts 8 Registration date Friday June 15, 2018 Status Member Last seen July 5, 2018
Jul 2, 2018 at 12:42 AM
Thank you so much Sir !
now it is working perfectly.
thanks a lot.
0