cs_petchy
Messages postés710Date d'inscriptionjeudi 20 février 2003StatutMembreDernière intervention19 mai 2015
-
15 avril 2006 à 17:08
cs_petchy
Messages postés710Date d'inscriptionjeudi 20 février 2003StatutMembreDernière intervention19 mai 2015
-
16 avril 2006 à 08:18
bonjour
[VB6]
A l'aide d'un bouton dans une forme je lance un fichier Excel.Comment à l'ouverture de se fichier lui intégré un bouton et lorsqu'on click sur se bouton on déclencherait une macro .
merci
@ plus
petchy
michelxld
Messages postés402Date d'inscriptionvendredi 6 août 2004StatutMembreDernière intervention12 octobre 200832 15 avril 2006 à 19:36
bonsoir Petchy
j'espere que cet exemple pourra t'aider
Private Sub Command1_Click()
Dim ExcelApp As Excel.Application
Dim Wb As Excel.Workbook
Dim Obj As Excel.OLEObject
Dim laMacro As String
Dim x As Integer
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
Set Wb = ExcelApp.Workbooks.Add(1)
Set Obj = Wb.Worksheets(1).OLEObjects.Add("Forms.CommandButton.1")
With Obj
.Left = 50
.Top = 50
.Width = 120
.Height = 30
.Object.Caption = "Supprimer données feuille"
End With