-
FlexPro
- Zoom sur FlexPro
- Fonctionnalités & Options
- Domaines d’application
- Tous les avantages
- Nouveau dans FlexPro 2021
- Testez FlexPro gratuitement
- FlexPro View OEM Freeware
- Conseils d’achat
- Login
- Langue
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produits
- News
- Support
- Société
- Emplois
- Contact
- Login
- Langue
- +49 6894 929600
- infoweisang.com
- Google Maps
Accueil > Community > Automation and VBA > Aufruf einer eigenen FPScript-Funktion > Reply To: Aufruf einer eigenen FPScript-Funktion
You have to distinguish if you want to call a FPScript function with one argument for different values or if you want to call a FPScript function with more than one argument. The following example shows how it works:
Sub test()
Dim myFormel As Formula
Dim mySignal As Signal
Dim myVariant As Variant
Dim testWert1 As Variant
Dim testWert2 As Variant
testWert1 = Array(“100”, “1”)
testWert2 = Array(“200”, “2”)
With ActiveDatabase.RootFolder
‘ Funktion zum Testen bekannt machen
Set myFormel = .Object(“FktTest”, fpObjectTypeFormula)
‘ Prüfen, ob es eine Formel ist
If TypeOf myFormel Is Formula Then Debug.Print “myFormel ist Formel”
‘ Ausgabe der Formel
Debug.Print myFormel.Formula
myVariant = myFormel.Call(testWert1, testWert2)
Debug.Print myVariant(0, 0)
Debug.Print myVariant(0, 1)
Debug.Print myVariant(1, 0)
Debug.Print myVariant(1, 1)
End With
End Sub