Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Messagebox warnings.
Message
From
14/07/1999 08:34:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
14/07/1999 07:46:56
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00241191
Message ID:
00241202
Views:
13
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform