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 30 31 32 33
|
Sub dessin_POI()
Dim sh As Shape, derlig As Integer, lig As Integer, T As Variant
Dim longitude As Double, latitude As Double
Dim Sepa As String, tablo() As String, txt As String
T = Get_List_POI(Sheets(Carte).ComboBox1.Value)
Sepa = Application.International(xlDecimalSeparator)
For lig = 1 To UBound(T)
txt = T(lig, 0)
If Not txt = "" Then
tablo = Split(T(lig, 2), ",") '<--- ici, déplacement d'une colonne (2 au lieu de 1)car dans la 1 il y a maintenant les transporteurs
longitude = (longitude0 + CDbl(Replace(tablo(1), ".", Sepa))) * 46.2 * Echelle
latitude = (latitude0 - CDbl(Replace(tablo(0), ".", Sepa))) * 66 * Echelle
Set sh = Sheets(Carte).Shapes.AddShape(msoShapeOval, longitude - 5, latitude - 5, 8, 8)
With sh
.Name = "_" & txt
Select Case T(lig, 1) '<--- ici, dans le tableau se trouve les noms des divers transporteurs Attention de bien orthographier les noms !
Case "Transdev": sh.Fill.ForeColor.RGB = RGB(255, 0, 0)
Case "Ratp Dev": sh.Fill.ForeColor.RGB = RGB(0, 255, 0)
Case "Kéolis": sh.Fill.ForeColor.RGB = RGB(0, 0, 255)
End Select
.Line.Weight = 1
.OnAction = "USF"
End With
End If
Next lig
Sheets(Carte).Range("A1").Select
End Sub |
Partager