1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Option Explicit
Private Type coordo
ligne As Integer
colonne As Integer
End Type
Private Sub test()
Dim cible As String
cible = "01/01/2009"
MsgBox "ligne " & coordonnees(cible).ligne & vbCrLf & "colonne " _
& coordonnees(cible).colonne
End Sub
Private Function coordonnees(achercher As String) As coordo
Dim temp As Range
With ActiveSheet.Cells
Set temp = Cells.Find(achercher, LookAt:=xlValue)
If Not temp Is Nothing Then
coordonnees.ligne = temp.Row
coordonnees.colonne = temp.Column
End If
End With
End Function |