General information
Category:
COM/DCOM and OLE Automation
Great. Thanks so much!
Steve Elster
oExcel = GETOBJECT(,'excel.application')
ObjExcel.Visible=.t.
*Sheets may be visible (-1 or 1), not visible (0) or very hidden xlVeryHidden,2
mWorks = transform(OExcel.Worksheets.Count)
for isheet=1 to OExcel.Worksheets.Count
with OExcel.Worksheets(isheet)
mSheet = oExcel.Worksheets(iSheet).name
mSheetNum = TRANSFORM(iSheet)
.Activate &&&&&&&&&&&&&&&&&&&&&&&&&&&& added
if .Shapes.Count>0
for ia=1 to .Shapes.Count
WITH .Shapes(ia)
IF .type= 8 AND .FormControlType=0 &&msoFormControl and XLButtonControl
.select
mSheetnum = "which is " + transform(isheet) + " of " + mWorks
mCount = TRANSFORM(ia) + " of a total of " + TRANSFORM(oExcel.Worksheets(isheet).Shapes.Count)
mType = transform(.type)
mCaption= transform(oexcel.selection.Characters.Text)
mAction = transform(.OnAction)
wait wind ;
"Worksheet " + mSheet +chr(13)+;
mSheetNum +chr(13)+;
mCount +chr(13)+;
" Type: " + mType +chr(13)+;
" Caption: " + mCaption +chr(13)+;
" onAction: " + mAction
endif
endwith
endfor
endif
endwith
endfor
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only