Dans chaque module, faudra bien indiquer le nom de l'objet...
Private Sub Command1_Click()
insertdetails (Command1.Caption)
End Sub
Private Sub Command2_Click()
insertdetails (Command2.Caption)
End Sub
voire, si array (groupe) de boutons
Private Sub Command_Click(integer Index) // pb pr syntaxe, ai oublié
insertdetails (Command(Index).Caption)
End Sub
Public Sub insertdetails(argf)
MsgBox (argf)
End Sub
Ou plus généraliste (juste idée, à ajuster/adapter)
Public Sub insertdetails(Control argf) ou (argf as Control), ai encore oublié (le C, ça lave le cerveau)
MsgBox (argf.Caption)
End Sub
Au début, on passe une chaîne Caption venant de n'importe quel objet,
Pour la version "finale", on passe l'adresse/nom d'un objet, et il cherche le membre Caption. S'il existe pas, Cf le résultat (erreur, ??, chaîne vide ?)