1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Dim itemligne, toolligne As String
Me.Top = (Screen.PrimaryScreen.WorkingArea.Height() - Me.Height)
Me.Left = (Screen.PrimaryScreen.WorkingArea.Width() - Me.Width)
nomfichier = excelapp.Workbooks.Open("u:important.xls")
excelapp.Sheets(1).activate()
ligne = 2 'je ne veux pas de ce qu'il y a sur la première ligne
ListBox1.Items.Clear()
While (excelapp.ActiveSheet.cells(ligne, 1).value) <> ""
itemligne = excelapp.ActiveSheet.cells(ligne, 2).value
If itemligne = "" Then itemligne = "-----"
itemligne = itemligne + " " + excelapp.ActiveSheet.cells(ligne, 1).value
ListBox1.Items.Add(itemligne)
---------------------------------------------------
If excelapp.ActiveSheet.cells(ligne, 1).comment Is Nothing Then
toolligne = "pas de commentaire"
Else
toolligne = excelapp.ActiveSheet.cells(ligne, 1).comment.text
End If
------------------------------------------------
ligne = ligne + 1
End While |
Partager