Guys,
Please help me in developing a small piece of code, Basically i have an excel which i need to run every week. So every time the new data should be updated in a new line but it should not erase the existing one.
So i need a code to find the end of a row in an excel and start executing set of conditions from the next row.
Please find the code below:-
Code:objExcel.Visible = True Myfile = "D:\Chart\DQ_03-23" Set objWB = objExcel.Workbooks.Open(Myfile) Set objWS = objWB.Worksheets.Add objWS.Name = "Chart" objWS.Cells(2, 1) = DatePart("yyyy", Now) objWS.Cells(2, 2) = DatePart("ww", Now) ActiveCell.FormulaR1C1 = "=RC[-2]&""_""&""FW""&RC[-1]" objWS.Cells(2, 3) = ActiveCell.FormulaR1C1
Excel o/p is below:
YEAR FW Yr_FW
2009 30 2009_FW30
*** ** ******
So, next time when i run it should search end of a row and execute the same 3 conditions.
Would you be able to help me in getting this code.
Thanks in advance




Reply With Quote