

![]() | 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: |
5 messages in org.openoffice.fr.prog[prog] Prog Une erreur dans une macro| From | Sent On | Attachments |
|---|---|---|
| Jean Sympa | Jul 1, 2009 2:22 am | |
| Thibault Vataire | Jul 1, 2009 3:00 am | |
| Jean Sympa | Jul 1, 2009 8:15 am | .jpg |
| Jean Sympa | Jul 2, 2009 1:21 am | |
| Francois Gatto | Jul 2, 2009 4:06 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: | [prog] Prog Une erreur dans une macro | Actions... |
|---|---|---|
| From: | Jean Sympa (jsy...@free.fr) | |
| Date: | Jul 1, 2009 2:22:52 am | |
| List: | org.openoffice.fr.prog | |
Bonjour à toutes et à tous,
Prog Une erreur dans une macro
Je voudrais, au démarrage d'une application, afficher un menu avec trois options. Je voudrais associer à chaque option un bouton qui me permettrait d'ouvrir un sous formulaire. Le retour d'un sous formulaire au menu ferait appel à un deuxième bouton.
Jean-Michel Pierre et François Gatto m'ont proposé un exemple. Il y a une erreur dans le formulaire, ouverture des formulaires. Je n'arrive pas à la corriger
REM ***** BASIC *****
' ouverture des formulaires
' se fait par appel d'une fonction
Sub onClickOuvrirFmTbClients( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "FmTbClients")
end sub
*Erreur d'exécution BASIC*
*L'argumentt n'est pas facultatif*
Sub onClickOuvrirFmTbRegion( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "FmTbRegion")
end sub
Sub onClickOuvrirFmTbDestinataires( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "FmTbDestinataires")
end sub
Sub onClickOuvrirFmTbProduits( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "FmTbProduits")
end sub
Sub onClickOuvrirFmTbLivraisonProduits( oEvent as variant )
OpenForm( OEvent.Source.Model.Parent.ActiveConnection.Parent.DatabaseDocument.FormDocuments, OEvent.Source.Model.Parent.ActiveConnection, "FmTbLivraisonProduits")
end sub
function OpenForm( formContainer as variant, oConnection as variant, sFormName as string) as variant
Dim aProp(1) As New com.sun.star.beans.PropertyValue
aProp(0).Name = "ActiveConnection"
aProp(0).Value = oConnection
aProp(1).Name = "OpenMode"
aProp(1).Value = "open"
OpenForm = formContainer.loadComponentFromURL(sFormName,"_blank",0,aProp())
end function
Avec mes remerciements
Cordialement
Papy








.jpg