>Hi,
>I am automating with vfp and excel spreadsheet when I get an error?
>
>Fatal error, exception code c000005
>line 131 Time and Date
>
>This line which I thought mimics me selecting two columns manually makes the error ??
>
>o.Application.Range("D:E").Select
>o.Application.Selection.EntireColumn.Insert
>
>but these do not
>
>o.Application.Range("D1").Select
>o.Application.Selection.EntireColumn.Insert
>o.Application.Range("D1").Select
>o.Application.Selection.EntireColumn.Insert
Steve,
Both worked on mine w/o error (VFP7 SP1, Excel 2000).
PS: Instead of a select and then insert, you could directly do in one shot (selection and range both return a range object) :
ox.ActiveWorkBook.ActiveSheet.Range("D:E").EntireColumn.Insert
Cetin