FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder
Products and Solutions
Support and Downloads
Company
Magazine
Contact Us
Language
MyWeisang

Account settings

Topic

String aus Formel mit VBA auslesen

Home page Community Automation and VBA Read string from formula with VBA

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34774
    Fri day
    Participant

    Hallo,
    ich habe in einer Datenbank einen Ordner mit unbekanntem Namen, in welchem eine Formel mit bekanntem Namen drin ist / sein sollte. Aus dieser Formel müsste ich mittels VBA einen String auslesen.
    Die Frage ist wie durchsuche ich die Datenbank und deren Ordner nach dieser Formel und wie greife ich auf den Inhalt dieser Formel zu?

    danke

    mfg

    #34776
    Fri day
    Participant

    Hallo,
    ich habe in einer Datenbank einen Ordner mit unbekanntem Namen, in welchem eine Formel mit bekanntem Namen drin ist / sein sollte. Aus dieser Formel müsste ich mittels VBA einen String auslesen.
    Die Frage ist wie durchsuche ich die Datenbank und deren Ordner nach dieser Formel und wie greife ich auf den Inhalt dieser Formel zu?

    danke

    mfg

    #34775
    Bernhard Kantz
    Participant

    For this purpose you can use the [b]SearchConstraints[/b] object and the [b]Search[/b]-function of the folder object.

    Example:
    [code]
    Dim oSearch As SearchConstraints

    Set oSearch = New SearchConstraints

    With oSearch.Add
    .SearchItem = fpSearchItemName
    .CompareOperation = fpSearchCompareOpTextIs
    .SearchValue = “FormulaName”
    .BooleanOperation = fpSearchBooleanOpAnd
    End With

    With oSearch.Add
    .SearchItem = fpSearchItemObjectType
    .CompareOperation = fpSearchCompareOpObjectTypeIsKindOf
    .SearchValue = fpObjectTypeFormula
    End With

    Dim oObjects, oObject
    Dim oFml As Formula

    Set oObjects = ActiveDatabase.RootFolder.Search(True, oSearch)
    Dim strContent As String

    For Each oObject In oObjects
    Set oFml = oObject
    strContent = oFml.Formula
    MsgBox strContent
    Next oObject
    [/code]

    support@weisang.com

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.