FlexPro
HistoryBase
Ingénierie
Formation
Téléchargements
Assistance FlexPro
Connaissance
Communauté
À propos de nous
Références
Emplois
Contact général
Liste des revendeurs
Assistance FlexPro
FR
DE
EN
Porte-plaquette
Produits et solutions
Support et téléchargements
Entreprise
Magazine
Contact
Langue
MyWeisang

Paramètres du compte.

Topic

Objects in a FlexPro data

Page d'accueil ' Communauté ' Automation et VBA ' Objets dans une donnée FlexPro

Voir les messages de 6 - 1 à 6 (sur un total de 6)
  • Auteur
    Messages
  • #34902
    David CHATEL
    Participant

    Hello,
    I try with VBA to make a list of all the objects that are contained in a FlexPro data. I have already tip the following code, but it doesn’t works, it say that fpObjects a wrong parameter is. Can somedoby help me? Is there a possibility to do this? Thank you for your answer!

    ————————————————
    Sub LookForObjects()
    Dim appFlex As FlexPro.Application
    Dim dbFlex As FlexPro.Database
    Dim fpObjs As fpobjects
    Dim fpObj As fpObject

    Set appFlex = New FlexPro.Application
    Set dbFlex = appFlex.Databases.Open(“Path”)

    ‘this fonction doesn’t work
    Set fpObjs = dbFlex.RootFolder.Objects

    For Each fpObj In fpObjs
    Debug.Print fpObj.Name
    Next

    appFlex.Quit fpDoNotSaveChanges
    End Sub

    #34907
    David CHATEL
    Participant

    Hello,
    I try with VBA to make a list of all the objects that are contained in a FlexPro data. I have already tip the following code, but it doesn’t works, it say that fpObjects a wrong parameter is. Can somedoby help me? Is there a possibility to do this? Thank you for your answer!

    ————————————————
    Sub LookForObjects()
    Dim appFlex As FlexPro.Application
    Dim dbFlex As FlexPro.Database
    Dim fpObjs As fpobjects
    Dim fpObj As fpObject

    Set appFlex = New FlexPro.Application
    Set dbFlex = appFlex.Databases.Open(“Path”)

    ‘this fonction doesn’t work
    Set fpObjs = dbFlex.RootFolder.Objects

    For Each fpObj In fpObjs
    Debug.Print fpObj.Name
    Next

    appFlex.Quit fpDoNotSaveChanges
    End Sub

    #34903
    Bernhard Kantz
    Participant

    This code should work. Unfortunately, we cannot reproduce your problem.
    Please register FlexPro again in the command line:
    flexpro.exe /regserver
    If this step doesn’t help update all your Microsoft Office products and reinstall FlexPro.

    support@weisang.com

    #34904
    David CHATEL
    Participant

    Thank you for your answer! I want to precise few things.
    I use this code with VBA Access and I am working with the standard version of FlexPro.

    With a another function, I can point of some objects (datasets, formulas, diagrams…) if I have before specified the type of this object.
    I cann’t manage to point an object if I don’t specify the type.
    Another element caught my attention. Then I write “Dim fpObjs as FlexPro.fpObjects”, I see that “fpObjects” is written with a capital on the O (in the selectionlist). See on the code, “fpobjects” is written whitout a capital. It that normal? Do I have to link another dll to get this function? Thank you for your help!

    #34905
    Bernhard Kantz
    Participant

    VBA is generally not case sensitive, although it will transform keywords into a standard case configuration and force the case of variable names to conform to the case of the entry within the symbol table entry.
    If you use FlexPro7 your code should work.
    If you use FlexPro6 please try the code:
    [code]
    Set fpObjs = dbFlex.RootFolder.Objects(“.*”)
    [/code]

    Support@weisang.com

    #34906
    David CHATEL
    Participant

    I use FlexPro 6 and your last tip works!
    Thank you!

Voir les messages de 6 - 1 à 6 (sur un total de 6)
  • Vous devez être connecté pour répondre à ce sujet.