1 2 3 4 5 6 7 8 9 10 11 12
| Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim appXl As New Excel.Application
Dim Classeur As Excel.Workbook = appXl.Workbooks.Add
Dim Feuille As Excel.Worksheet = DirectCast(Classeur.Worksheets.Item(1), Excel.Worksheet)
Dim polo As Int32 = 2
If polo > 1 Then
Dim Plage As Excel.Range = DirectCast(Feuille.Cells(6, 1), Excel.Range)
Feuille.Shapes.AddPicture("D:\svg\developpez\bidou.jpg", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue, CSng(Plage.Left), CSng(Plage.Top), 100, 100)
appXl.Visible = True
End If
End Sub |
Partager