Private Sub vbalExplorerBarCtl3_ItemClick(itm As=20
vbalExplorerBarLib6.cExplorerBarItem)
=20
' Bouton "Ajouter une nouvelle t=E2che"
=20
If itm.Key =3D "NEWTASK" Then
If itm.Text =3D "Ajouter une nouvelle t=E2che" Then
Adodc1.Recordset.AddNew
.........
ensuite j ai une auttre fonction o=F9 je souhaite appeler=20
la fonction precedente dc je fai ceci :
Private Sub cmdbar_ButtonClick(Index As Integer, btn As=20
vbalCmdBar6.cButton)
If btn.Key =3D "EDITTASK" Then
vbalExplorerBarCtl3_ItemClick ("NEWTASK")
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
ng
Salut,
Regarde bien le type, le paramètres doit être un objet cExplorerBarItem :
Call vbalExplorerBarCtl3_ItemClick(Btn)
Mais d'une manière générale, il n'est pas recommandé d'appeler des procédure d'événement, il est préférable de créer une autre procédure qui sera appelée par l'événement et par ton autre code.
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
fabrizio-r a écrit :
Bonjour a tous,
Voila j ai une fonction de la forme suivante :
Private Sub vbalExplorerBarCtl3_ItemClick(itm As vbalExplorerBarLib6.cExplorerBarItem)
' Bouton "Ajouter une nouvelle tâche"
If itm.Key = "NEWTASK" Then If itm.Text = "Ajouter une nouvelle tâche" Then Adodc1.Recordset.AddNew .........
ensuite j ai une auttre fonction où je souhaite appeler la fonction precedente dc je fai ceci :
Private Sub cmdbar_ButtonClick(Index As Integer, btn As vbalCmdBar6.cButton)
If btn.Key = "EDITTASK" Then vbalExplorerBarCtl3_ItemClick ("NEWTASK")
.......
et ca ne fonctionne pas....
si quelqu un peut m aider.....
Merci d avance
Fabrice.
Salut,
Regarde bien le type, le paramètres doit être un objet cExplorerBarItem :
Call vbalExplorerBarCtl3_ItemClick(Btn)
Mais d'une manière générale, il n'est pas recommandé d'appeler des procédure
d'événement, il est préférable de créer une autre procédure qui sera appelée
par l'événement et par ton autre code.
--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
http://apisvb.europe.webmatrixhosting.net/
fabrizio-r <anonymous@discussions.microsoft.com> a écrit :
Bonjour a tous,
Voila j ai une fonction de la forme suivante :
Private Sub vbalExplorerBarCtl3_ItemClick(itm As
vbalExplorerBarLib6.cExplorerBarItem)
' Bouton "Ajouter une nouvelle tâche"
If itm.Key = "NEWTASK" Then
If itm.Text = "Ajouter une nouvelle tâche" Then
Adodc1.Recordset.AddNew
.........
ensuite j ai une auttre fonction où je souhaite appeler
la fonction precedente dc je fai ceci :
Private Sub cmdbar_ButtonClick(Index As Integer, btn As
vbalCmdBar6.cButton)
If btn.Key = "EDITTASK" Then
vbalExplorerBarCtl3_ItemClick ("NEWTASK")
Regarde bien le type, le paramètres doit être un objet cExplorerBarItem :
Call vbalExplorerBarCtl3_ItemClick(Btn)
Mais d'une manière générale, il n'est pas recommandé d'appeler des procédure d'événement, il est préférable de créer une autre procédure qui sera appelée par l'événement et par ton autre code.
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
fabrizio-r a écrit :
Bonjour a tous,
Voila j ai une fonction de la forme suivante :
Private Sub vbalExplorerBarCtl3_ItemClick(itm As vbalExplorerBarLib6.cExplorerBarItem)
' Bouton "Ajouter une nouvelle tâche"
If itm.Key = "NEWTASK" Then If itm.Text = "Ajouter une nouvelle tâche" Then Adodc1.Recordset.AddNew .........
ensuite j ai une auttre fonction où je souhaite appeler la fonction precedente dc je fai ceci :
Private Sub cmdbar_ButtonClick(Index As Integer, btn As vbalCmdBar6.cButton)
If btn.Key = "EDITTASK" Then vbalExplorerBarCtl3_ItemClick ("NEWTASK")