Hello. Im trying to write to file -but everytime I manually delete data from cells and file is empty(except header row) it doesn't start writing from A2, which is the next free row after the Header row. Instead it writes some wheredown column A. here is the code.
[VBA] Set IWorkbook = Workbooks.open(FolderName & "IFiles.xls"_ Format:=xlDelimited)
IWorkbook.Sheets(1).usedRange
If Not IWorkbook is Nothing then
IWorkbook.activate
With IWorkbook.Sheets(1)
rowsTmp = UsedRange.Rows.Count+1
.Cells(rowTmp, 1 ) =wName
.Cells(rowsTmp, 2) = Now
IWorkbook.close Save Changes:=true
End With
End if
[/VBA]
Thanks in advance