Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation Question: Insert a row
Message
From
09/04/2007 07:02:18
 
 
To
08/04/2007 16:42:32
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01213304
Message ID:
01213379
Views:
27
This message has been marked as a message which has helped to the initial question of the thread.
Hi Chaim.

Using the macro recorder, I found that Excel inserts using the characteristics of the following row like this:

Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromRightOrBelow

But I cannot figure out how to convert this Excel syntax to a syntax that VFP will accept.


Here are the steps that to use to translate the VBA into VFP:
1. Add parentheses around the parameter list
2. Examine the calling prototype for the method in the object browser and rearrange the parameters in the generated macro so that they appear in the same order that they are listed here. Because VBA uses named parameters, their order does not matter. This is not so in VFP where parameters are positional. Regardless of the order of the parameters in the VBA macro, the Object Browser and IntelliSense always display them in the order required for correct Visual FoxPro syntax.
3. Remove the names of the parameters on the left side of the ‘:=’ as well as the ‘:=’
4. Replace the named constants with their values. This includes replacing True with 1 and False with 0. Note: An alternative would have been to add #DEFINE statements at the top of the method like this after looking up the values for the named constants in the Object Browser:
#DEFINE TRUE 1
#DEFINE FALSE 0
#DEFINE WDOPENFORMATAUTO 0
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform