Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Messagebox warnings.
Message
From
14/07/1999 08:43:01
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
 
To
14/07/1999 08:34:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00241191
Message ID:
00241214
Views:
12
>>Hello,
>> I'm trying to automate some reports in Excel through VFP and I don't want the user to have to click "Are you sure" "OK" everytime I make a change or delete a row. In VB all you have to do is add ":=vbOk" but I can't seem to figure out how to do that in Fox. I do know that those "vbOK"'s and the like are variables with constant numeric values, but not how to use them.
>>
>>Thank you very much.
>>Ian
>Ian,
>Excel doesn't popup "Are you sure" when you delete or change a row :
>oExcel.ActiveSheet.Rows(nRow).delete
>What's the command you're using ?
>Anyway vbOk and alike are used as :
>
>#include "vbConstants.h" && All vbConstants in a header file
>* Or
>#define vbOK 1
>OLECommand(...,vbOK,...)
>In VFP you cannot use named arguments as in VB. You should use positional arguments. ie :
>
>expression.AutoFormat(Format, Number, Font, Alignment, Border, Pattern, Width)
>This is VB style
>ActiveSheet.Range("A1:D10"). _
> AutoFormat Format:=xlRangeAutoFormatSimple2 Font:=False Border:=False
>
>This is counterpart VFP style :
>oExcel.ActiveSheet.Range("A1:D10").AutoFormat( ;
> xlRangeAutoFormatSimple2,,.F.,,.F.)
>
>You just omit the optional variants (variables).
>Cetin

Pls note that this a very commonly asked question for users who are doing vfp-office programming...

U can create a FAQ for the same, which can be very helpful for others...
Previous
Reply
Map
View

Click here to load this message in the networking platform