Article ID: 138398
Article Last Modified on 3/14/2005
FOR i = 1 TO 3
oObject = CREATEOBJECT('Excel.Application')
RELEASE oObject
ENDFOR
To end each Microsoft Excel session before reentering the FOR loop, the
Microsoft Excel session must first be terminated. For example:
FOR i = 1 TO 3
oObject = CREATEOBJECT('Excel.Application')
oObject.Quit
RELEASE oObject
ENDFOR
In this example, Microsoft Excel is told to quit, and then the code
releases the memory variable in Visual FoxPro by using the oObject.Release
command. Quit is a method that Microsoft Excel recognizes and can act upon,
the actual method for your OLE automation application may differ.
FOR i = 1 TO 3
oObject = CREATEOBJECT('Excel.Application')
WAIT WINDOW 'Created Excel Object' + STR(i)
RELEASE oObject
ENDFOR
Additional query words: VfoxWin kbvfp300 kbvfp500 kbvfp500a kbvfp600
Keywords: kbprb KB138398