Article ID: 161199
Article Last Modified on 10/16/2002
PUBLIC otest
otest=CREATE("excel.application")
otest.Visible=1
otest.workbooks.ADD
otest.workbooks.ADD
FOR EACH wb IN otest.WorkBooks && this works fine
? wb.Name
ENDFOR
myvar = otest.WorkBooks && create an object variable
FOR EACH wb IN myvar && this fails with error message
? wb.Name
ENDFOR
otest.Quit
The first FOR EACH...ENDFOR loop places the names for the two workbooks on
the Visual FoxPro desktop. The second loop, using the object variable,
causes an error message.
Keywords: kbbug kbfix kbvfp500afix kbprogramming KB161199