

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in org.openoffice.fr.progRe: [prog] [Ooo 2] charger une biblio...| From | Sent On | Attachments |
|---|---|---|
| zorglub.1er | Mar 12, 2006 2:28 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [prog] [Ooo 2] charger une bibliothèque | Actions... |
|---|---|---|
| From: | zorglub.1er (zorg...@laposte.net) | |
| Date: | Mar 12, 2006 2:28:15 am | |
| List: | org.openoffice.fr.prog | |
Bonjour,
Est il possible d'avoir un exemple de macro où l'appel d'une bibliothèque ce
fait par :
Call BibliothèqueExterneàLaMacroAChargéeParCetteCommandedansMacroA (arg)
C'est pour bien comprendre la différence entre les expressions Call DLL (arg) et
BasicLibraries.LoadLibrary("Beta").
Et dans quel cas utiliser plus une expression qu'une autre.
Cordialement
A bientôt :0)
Bonjour zorglub.1er Message du 2006-03-04 14:22:
Est il possible d'avoir un exemple de macro (la macro A de la bibliothèque A) qui appele une autre macro (la macro B dans bibliothèque B) ; dans le cas où la bibliothèque B est chargée, puis dans le cas où elle n'est pas chargée ?
Un point de détail : il vaut mieux choisir des noms distincts pour la bibliothèque, les modules de la bibli, les noms de macro de la bibli. Sinon, risque de fautes du basic ! Donc je choisis une macro A dans la bibli Alpha, et une macro B dans la bibli Beta.
Voici une macro A qui appelle la macro B (dans le même document)
Sub A() BasicLibraries.LoadLibrary("Beta") ' --- ici un codage quelconque éventuel
B() ' ici j'appelle la macro B ' --- ici la suite du codage de la macro A
B() ' ici j'appelle encore une fois la macro B ' etc End Sub
Comme tu le vois, je ne me préoccupe pas de savoir si la bibli Beta est chargée ou non. Je la charge une bonne fois avant d'en avoir besoin. J'aurais aussi bien pu charger les biblis Alpha et Beta dans une macro de la bibliothèque Standard.
Sub C() ' dans la bibli Standard BasicLibraries.LoadLibrary("Alpha") BasicLibraries.LoadLibrary("Beta") ' --- ici un codage quelconque éventuel
A() ' ici j'appelle la macro A End Sub
Dans ce cas, la macro A se simplifie:
Sub A() ' --- ici un codage quelconque éventuel
B() ' ici j'appelle la macro B ' --- ici la suite du codage de la macro A
B() ' ici j'appelle encore une fois la macro B ' etc End Sub
Bernard
Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)
Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)







