Bonjour à tous voila comme l'intitulé de ce post l'indique je cherche à déclencher une macro Excel depuis une application VB.NET auriez vous une piste? Merci
Bonjour à tous voila comme l'intitulé de ce post l'indique je cherche à déclencher une macro Excel depuis une application VB.NET auriez vous une piste? Merci
Salut
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 Imports excel = Microsoft.Office.Interop.Excel Private Sub RunMacro() Dim oExcel As New excel.Application Dim oBook As excel.Workbook 'Start Excel and open the workbook. oBook = oExcel.Workbooks.Open("C:\BLABLA.xls") 'Run the macros. oExcel.Run("macro1") oExcel.Visible = True oExcel = Nothing End Sub
Partager