Hello everyone
I have a situation in which I want my program to group a set of shapes in Excel into one group. The shapes are textboxes. In order to do this, I started the macro recorder, built 2 textboxes,grouped them, switched to view the macro,and implement the code in my VFP program.
Essentially (left some unimportant propsettings out) this is the macro code:
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 51#, 48#, 60# _
, 16.5).Select
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 51#, 64.5, 60# _
, 16.5).Select
ActiveSheet.Shapes.Range(Array("Text Box 2", "Text Box 1")).Select
Selection.ShapeRange.Group.Select
It is easy enough to automate the first two statements and the fourth by VFP, but the third I cannot do, because of the ARRAY-call.
If I put the two strings "Text Box 2" and "Text Box 1" in a VFP array and give the array as an argument to Range() it doesn't work.
So how to do this in VFP?
Lennert