Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Parameters to VB function
Message
De
16/11/1999 18:04:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00291539
Message ID:
00291697
Vues:
25
I'm not familiar with MSProject so you may want to start another thread but if you could tell me what the three parameters you're passing to FileOpen and how its blowing up, I may be able to help you.

--->
Syntax: FileOpen(Name, ReadOnly, Merge, TaskInformation, Table, Sheet, NoAuto, UserID, DatabasePassWord, FormatID,map, OpenPool)

Sorry for the overload, but it's faster than explaining - more comments after this section. This is the Definitions from the help file:

Name:Required String. The name of the project file, source file, or data source to open.

ReadOnly:Optional Boolean. True if the file is opened read-only. If selectively importing data instead of loading a complete project, ReadOnly is ignored.

Merge:Optional Long. Specifies whether to automatically merge the file with the active project. If Map is specified, Merge is ignored. Can be one of the following PjMerge constants: pjDoNotMerge, pjMerge, pjAppend, or pjPrompt. The default value is pjDoNotMerge.

TaskInformation:Optional Boolean. True if the file contains information on tasks, for a project saved under a non-Microsoft Project file format. False if the file contains information on resources. If Map is specified, TaskInformation is ignored. The default value is True if the active view is a task view; otherwise it is False.

Table:Optional String. The name of a table in which to place the resource or task information, for a project saved under a non-Microsoft Project file format. If Map is specified, or Name specifies a database file or format, Table is ignored. The default value for Table is the name of the active table.

Sheet:Optional String. The sheet to read when opening a workbook created in Microsoft Excel version 5.0 or later. If Map is specified, or if the file specified with Name is not a Microsoft Excel file, Sheet is ignored.

NoAuto:Optional Boolean. True if any Auto_Open macro is prevented from running. The default value is False.

UserID:Optional String. A user ID to use when accessing a database. If Name or FormatID isn't a database, UserID is ignored.

DatabasePassWord:Optional String. A password to use when accessing a database. If Name or FormatID isn't a database, DatabasePassWord is ignored.

FormatID:Optional String. The file or database format. If Microsoft Project recognizes the format of the file specified with Name, FormatID is ignored. Can be one of the following format strings:
------
The only ones I want to pass are name, readonly, userid, databasepassword, format id. However Fox won't let me just pass those. It blows up when it comes to taskinfo. It doesn't matter what I put in there, just entering commas to try and skip it, .t., .f., 0,1,-1, "TRUE", "FALSE"; it gives me the following error: Ole Dispatch exception code 1101. Argument is not valid. We've tried it with native VB code and it dies the same way, so there's some sort of bug with taskinfo that's broader than just fox interaction.

That's why I was resorting to creating a macro/function and passing it the parameters I want, because then I could use "named" parameters and skip that one.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform