General information
Category:
COM/DCOM and OLE Automation
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
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