Hello All,
I'm trying out an Excel example from the book "Microsoft Office Automation with Visual Foxpro" , the example in question "Scans" a table, populates a couple of columns and moves down a row ( in the worksheet ) using the Range.Offset method, however when I look at the output spreadsheet there is only one row populated which contains data from the last record, indicating the Offset method is not working, any ideas as to why this is?
my code snippet
I've left all the object creation code out for brevity
oRange = .Range("A12:C12")
scan
.Columns[1].Value = myfieldata1
.Columns[2].Value = myfieldata2
.Columns[3].Value = myfieldata3
oRange = oRange.Offset(1,0)
endscan
The fist iteration is fine but subsequent ones are overwriting the previous values, I'm using VFP 7.0. and Office 97 on Win XP pro, any help much appreciated
regards
Pete Kane
Regards,
Peter J. Kane
Pete