M 
		
				
			
		mickeyEsial
Guest
Hi,
my pb si very simple :
i can't find the correct way to call a sub with 2 parameters in a "ONACTION":
Have a look :
	
	
	
		
        
cb.ShowPopup
End If
End If
 
End Sub
 my pb si very simple :
i can't find the correct way to call a sub with 2 parameters in a "ONACTION":
Have a look :
		Code:
	
	
	Private Sub lstPers_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
 If Button = 2 Then
    ' pour la popup
    If Me.lstPers.ListIndex <> -1 Then
        Dim cb As CommandBar
        Dim cbc As CommandBarControl
        Set cb = CommandBars.Add(Name:="", Position:=msoBarPopup, MenuBar:=False, Temporary:=False)
        Set cbc = cb.Controls.Add(Type:=msoControlButton)
        With cbc
            .Caption = "Supprimer cette personne de la base"
            [B].OnAction = "suppPersonne ARG1,ARG2"[/B]        
End With
	cb.ShowPopup
End If
End If
End Sub
			
				Last edited by a moderator: