-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Home > Community > Automation and VBA > Liste déroulante avec objet différent en VBA > Antwort auf: Liste déroulante avec objet différent en VBA
Juni 26, 2008 um 11:32 pm Uhr
#8601

Teilnehmer
Try this code:
ActiveDatabase.ActiveObject.Cursor(fpCursorMinX).Active = True
p1 = ActiveDatabase.ActiveObject.ActiveCursor.PositionIndex
ActiveDatabase.ActiveObject.Cursor(fpCursorMaxX).Active = True
p2 = ActiveDatabase.ActiveObject.ActiveCursor.PositionIndex
ActiveDatabase.ActiveObject.CursorActive = False
Dim Moy As StatisticQuantityAnalysis
Set Moy = ActiveDatabase.ActiveFolder.Add("Moy", fpObjectTypeStatisticQuantity)
With Moy
.DataSet = "beber[" & CStr(p1) & "," & CStr(p2) & "]"
.Quantity = fpStatisticQuantityArithmeticMean
.Update
End With
But in this case it’s easier to use FPScript instead of VBA!
1) Create a FPScript formula ‘beberSection’:
(beber)[Diagram.2D.Cursor(fpCursorMinX, 1).PositionIndex, Diagram.2D.Cursor(fpCursorMaxX, 1).PositionIndex]
2) Create a Mean analysis object with the data set ‘beberSection’.
If you change the position of the cursors FlexPro automatically recalculates the mean value of the new data part.