PANKAJUTEKAR
Board Regular
- Joined
- Jun 10, 2011
- Messages
- 79
Dear All,
i have a small query.
the following code i got from Sektor Sir, an excellent solution for me to adding records in row in perticular raange.
A small change i required in this code....some one kindly sugget.
Query 1 -
The above code on sheet4. What i tryed, my records are savings.
ok..it come till now row 30.
Now, the new record goes on sheet 5 and started to save from 2nd row, instead of going 31 row.
Is this possible, Experts?
Query 2 -
Whatever the records are saved, i am talking from the first record that is row 16. That exactly started from 16 only.
How come this possible in above code?
I found that only -
Can pls anyone explain? This must be understand the expert logic.
i have a small query.
the following code i got from Sektor Sir, an excellent solution for me to adding records in row in perticular raange.
A small change i required in this code....some one kindly sugget.
Sub addrecord()
Dim lastRow As Long, arr As Variant
lastRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
If lastRow = 1 Then lastRow = 1
'(ROWINDEX, COLINDEX)
arr = Array(Cells(4, 6), Cells(5, 6), Cells(11, 2), Cells(7, 6), Cells(8, 6), Cells(9, 6))
Cells(lastRow, 1).Resize(, 6) = arr
Range("F5,F6,F7,F8,F9,b11").ClearContents
Query 1 -
The above code on sheet4. What i tryed, my records are savings.
ok..it come till now row 30.
Now, the new record goes on sheet 5 and started to save from 2nd row, instead of going 31 row.
Is this possible, Experts?
Query 2 -
Whatever the records are saved, i am talking from the first record that is row 16. That exactly started from 16 only.
How come this possible in above code?
I found that only -
this is specifies the row start column. but how the save button understand that record should start to save from 16 row onwards?lastRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
Can pls anyone explain? This must be understand the expert logic.