Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel97 SaveAs Method question
Message
From
17/02/1999 08:38:55
Jacci Adams
Lindsay-Adams Consulting
Louisville, Ohio, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00188089
Message ID:
00188335
Views:
21
Hi Dave,

>Use .f. and .t. for True and False when calling the Excel object methods. In Word the Close() method lets you say whether or not they should see the dialog, but Excel doesn't seem to have the same thing. If you know ahead of time you are going to overwrite the file why not just ERASE it in VFP to start with?
>

Thanks for the helpful hints. I wasn't sure how to pass True and False to Excel. Actually as I was composing this message it came to me to ERASE the file first, but thought maybe there was something I was missing. Guess not.

Jacci


>>I'm working in VFP6 and Excel 97. I'm creating Excel files that are overwritten each time the program is run. I'm using the SaveAs method with what I think are the appropriate parameters and I get a dialog box that comes up xxxx.xls already exists, do you want to overwrite? I don't want this behavior.
>>
>>I'm trying to get the SaveAs method NOT to ask me if I want to overwrite an existing file. Below is the command with all the parameters. Am I missing something?
>>
>>
>>oXls.ActiveWorkbook.SaveAs(lcSaveFile,-4143, "", "", "False", "False" ,1 ,2)
>>
>>The SaveAs Method uses the following parameters:
>>filename
>>fileformat = xlNormal (excel constant)
>>password = character string
>>writeResPassword = character string
>>ReadOnlyRecommended = either True or False (Is this passed as a character string?)
>>CreateBackup = True or False
>>AccessMode = xlShared, xlExclusive, or xlNoChange
>>Conflict Resolution = xlUserResolution, xlLocalSessionChange, or xlOtherSessionChanges
>>
>>I've tried recording a macro to give me all the parameters but it stops at the CreateBackup parameter.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform