Académique Documents
Professionnel Documents
Culture Documents
date1 = UserForm1.TextBox2.Text
date2 = UserForm1.TextBox3.Text
date1 = Replace(date1, "/", "-")
date2 = Replace(date2, "/", "-")
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
' Cell Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("C" & RowTOP))
Print #1, "</name>"
Print #1, " <visibility>0</visibility>"
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
RowTOP = RowTOP + 1
Loop
'Site Name
Print #1, "<Placemark>"
Print #1, "<name>"
Print #1, (wsresult.Range("CK" & RowTOP))
Print #1, "</name>"
Print #1, "<visibility>0</visibility> "
Print #1, " <styleUrl>#sh_shaded_dot</styleUrl>"
Print #1, " <Point>"
'
' wsresult.Range ("CH" & RowTOP)
Print #1, " <coordinates>"
Print #1, wsresult.Range("CI" & RowTOP)
Print #1, ","
Print #1, wsresult.Range("CH" & RowTOP)
Print #1, ", 20"
Print #1, " </coordinates>"
Print #1, " </Point>"
Print #1, " </Placemark>"
End If
Close #1
End Sub
'Point 1
Const pi = 3.14159265358979
Dim val1 As Double
' Convert 60 degrees to radians by multiplying by pi/180.
val1 = Sin(60 * pi / 180)
'Point 1
''Point 2
px2 = r * Sin((Angle + 25) * (pi / 180)) + x
py2 = r * Cos((Angle + 25) * (pi / 180)) + y
'
''point 3
px3 = r * Sin((Angle + 20) * (pi / 180)) + x
py3 = r * Cos((Angle + 20) * (pi / 180)) + y
'
''point 4
'point 5
px5 = r * Sin((Angle + 10) * (pi / 180)) + x
py5 = r * Cos((Angle + 10) * (pi / 180)) + y
'Point 6 Center
'point 7
'point 8
'point 9
'point 11
'point 12
Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
px3 & "," & py3 & ",20" & " " & px4 & "," & py4 & ",20" & " " & px5 & "," & py5 &
",20" & " " & px6 & "," & py6 & ",20" & " " & px7 & "," & py7 & ",20" & " " & px8 &
"," & py8 & ",20" & " " & px9 & "," & py9 & ",20" & " " & px10 & "," & py10 & ",20"
& " " & px11 & "," & py11 & ",20" & " " & px12 & "," & py12 & ",20" & " " & x & ","
& y & ",20"
' Coords = Coords & px1 & "," & py1 & ",20" & " " & px3 & "," & py3 & ",20" & px5
& "," & py5 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
px3 & "," & py3 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & " " & px2 & "," & py2 & ",20" & " " & x & ","
& y & ",20"
Polygon = Coords
End Function
'Point 1
Const pi = 3.14159265358979
Dim val1 As Double
' Convert 60 degrees to radians by multiplying by pi/180.
val1 = Sin(60 * pi / 180)
'Point 1
''Point 2
px2 = r * Sin((Angle + 25) * (pi / 180)) + x
py2 = r * Cos((Angle + 25) * (pi / 180)) + y
'
''point 3
px3 = r * Sin((Angle + 20) * (pi / 180)) + x
py3 = r * Cos((Angle + 20) * (pi / 180)) + y
'
''point 4
'point 5
px5 = r * Sin((Angle + 10) * (pi / 180)) + x
py5 = r * Cos((Angle + 10) * (pi / 180)) + y
'Point 6 Center
'point 7
'point 8
px9 = r * Sin((Angle - 10) * (pi / 180)) + x
py9 = r * Cos((Angle - 10) * (pi / 180)) + y
'point 9
'point 10
'point 11
'point 12
Coords = px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " & px3 & ","
& py3 & ",20" & " " & px4 & "," & py4 & ",20" & " " & px5 & "," & py5 & ",20" & " "
& px6 & "," & py6 & ",20" & " " & px7 & "," & py7 & ",20" & " " & px8 & "," & py8 &
",20" & " " & px9 & "," & py9 & ",20" & " " & px10 & "," & py10 & ",20" & " " &
px11 & "," & py11 & ",20" & " " & px1 & "," & py1 & ",20" ' & " " & px11 & "," &
py11 & ",20" & " " & x & "," & y & ",20"
'Coords = px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " & px3 &
"," & py3 & ",20" & " " & px4 & "," & py4 & ",20" & " " & px5 & "," & py5 & ",20" &
" " & px6 & "," & py6 & ",20" & " " & px7 & "," & py7 & ",20" & " " & px8 & "," &
py8 & ",20" & " " & px9 & "," & py9 & ",20" & " " & px10 & "," & py10 & ",20" & " "
& px11 & "," & py11 & ",20" & " " & px12 & "," & py12 & ",20" & " " & px1 & "," &
py1 & ",20" ' & " " & px11 & "," & py11 & ",20" & " " & x & "," & y & ",20"
' Coords = Coords & px1 & "," & py1 & ",20" & " " & px3 & "," & py3 & ",20" & px5
& "," & py5 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
px3 & "," & py3 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & " " & px2 & "," & py2 & ",20" & " " & x & ","
& y & ",20"
PolygonP2 = Coords
End Function
'Point 1
Const pi = 3.14159265358979
Dim val1 As Double
' Convert 60 degrees to radians by multiplying by pi/180.
val1 = Sin(60 * pi / 180)
'Point 1
px1 = r * Sin((Angle + 32) * (pi / 180)) + x
py1 = r * Cos((Angle + 32) * (pi / 180)) + y
' px1 = r * Sin((Angle + 30) * (pi / 180)) + x
' py1 = r * Cos((Angle + 30) * (pi / 180)) + y
'
' px1 = r * Sin(360 - Angle + 30) + x
' py1 = r * Cos(360 - Angle + 30) + y
'' px1 = r * Sin(360 - Angle + 30) + x
' py1 = r * Cos(360 - Angle + 30) + y
''Point 2
px2 = r * Sin((Angle + 35) * (pi / 180)) + x
py2 = r * Cos((Angle + 35) * (pi / 180)) + y
'
'px2 = r * Sin((Angle + 25) * (pi / 180)) + x
' py2 = r * Cos((Angle + 25) * (pi / 180)) + y
'
''point 3
px3 = r * Sin((Angle + 20) * (pi / 180)) + x
py3 = r * Cos((Angle + 20) * (pi / 180)) + y
'
''point 4
'point 5
px5 = r * Sin((Angle + 10) * (pi / 180)) + x
py5 = r * Cos((Angle + 10) * (pi / 180)) + y
px6 = r * Sin((Angle + 5) * (pi / 180)) + x
py6 = r * Cos((Angle + 5) * (pi / 180)) + y
'Point 6 Center
'point 7
'point 8
'point 9
'point 10
'point 11
'point 12
'Coords =
'Coords = px2 & "," & py2 & ",20" & " " & px3 & "," & py3 & ",20" & " " & px4 &
"," & py4 & ",20" & " " & px5 & "," & py5 & ",20" & " " & px6 & "," & py6 & ",20" &
" " & px7 & "," & py7 & ",20" & " " & px8 & "," & py8 & ",20" & " " & px9 & "," &
py9 & ",20" & " " & px10 & "," & py10 & ",20" & " " & px11 & "," & py11 & ",20"
' & " " & px11 & "," & py11 & ",20" & " " & px12 & "," & py12 & ",20" & " " & x &
"," & y & ",20"
' Coords = Coords & px1 & "," & py1 & ",20" & " " & px3 & "," & py3 & ",20" & px5
& "," & py5 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
px3 & "," & py3 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & " " & px2 & "," & py2 & ",20" & " " & x & ","
& y & ",20"
Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " & x
& "," & y & ",20"
PolygonP3 = Coords
End Function
'Point 1
Const pi = 3.14159265358979
Dim val1 As Double
' Convert 60 degrees to radians by multiplying by pi/180.
val1 = Sin(60 * pi / 180)
'Point 1
px1 = r * Sin((Angle - 27) * (pi / 180)) + x
py1 = r * Cos((Angle - 27) * (pi / 180)) + y
' px1 = r * Sin((Angle + 30) * (pi / 180)) + x
' py1 = r * Cos((Angle + 30) * (pi / 180)) + y
'
' px1 = r * Sin(360 - Angle + 30) + x
' py1 = r * Cos(360 - Angle + 30) + y
'' px1 = r * Sin(360 - Angle + 30) + x
' py1 = r * Cos(360 - Angle + 30) + y
''Point 2
px2 = r * Sin((Angle - 30) * (pi / 180)) + x
py2 = r * Cos((Angle - 30) * (pi / 180)) + y
'
''point 3
px3 = r * Sin((Angle + 20) * (pi / 180)) + x
py3 = r * Cos((Angle + 20) * (pi / 180)) + y
'
''point 4
'point 5
px5 = r * Sin((Angle + 10) * (pi / 180)) + x
py5 = r * Cos((Angle + 10) * (pi / 180)) + y
'Point 6 Center
'point 7
'point 8
'point 9
'point 10
'point 11
'Coords =
'Coords = px2 & "," & py2 & ",20" & " " & px3 & "," & py3 & ",20" & " " & px4 &
"," & py4 & ",20" & " " & px5 & "," & py5 & ",20" & " " & px6 & "," & py6 & ",20" &
" " & px7 & "," & py7 & ",20" & " " & px8 & "," & py8 & ",20" & " " & px9 & "," &
py9 & ",20" & " " & px10 & "," & py10 & ",20" & " " & px11 & "," & py11 & ",20"
' & " " & px11 & "," & py11 & ",20" & " " & px12 & "," & py12 & ",20" & " " & x &
"," & y & ",20"
' Coords = Coords & px1 & "," & py1 & ",20" & " " & px3 & "," & py3 & ",20" & px5
& "," & py5 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
px3 & "," & py3 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
px3 & "," & py3 x & "," & y & ",20"
Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " & x
& "," & y & ",20"
PolygonP4 = Coords
End Function
'Point 1
Const pi = 3.14159265358979
Dim val1 As Double
' Convert 60 degrees to radians by multiplying by pi/180.
val1 = Sin(60 * pi / 180)
'Point 1
''Point 2
px2 = r * Sin((Angle + 25) * (pi / 180)) + x
py2 = r * Cos((Angle + 25) * (pi / 180)) + y
'
''point 3
px3 = r * Sin((Angle + 20) * (pi / 180)) + x
py3 = r * Cos((Angle + 20) * (pi / 180)) + y
'
''point 4
'point 5
px5 = r * Sin((Angle + 10) * (pi / 180)) + x
py5 = r * Cos((Angle + 10) * (pi / 180)) + y
px6 = r * Sin((Angle + 5) * (pi / 180)) + x
py6 = r * Cos((Angle + 5) * (pi / 180)) + y
'Point 6 Center
'point 7
'point 8
'point 9
'point 10
'point 11
'point 12
Coords = Coords & px1 & "," & py1 & ",10" & " " & px2 & "," & py2 & ",10" & " " &
px3 & "," & py3 & ",10" & " " & px4 & "," & py4 & ",10" & " " & px5 & "," & py5 &
",10" & " " & px6 & "," & py6 & ",10" & " " & px7 & "," & py7 & ",10" & " " & px8 &
"," & py8 & ",10" & " " & px9 & "," & py9 & ",10" & " " & px10 & "," & py10 & ",10"
& " " & px11 & "," & py11 & ",10" & " " & px12 & "," & py12 & ",10" & " " & x & ","
& y & ",10"
' Coords = Coords & px1 & "," & py1 & ",20" & " " & px3 & "," & py3 & ",20" & px5
& "," & py5 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & ",20" & " " & px2 & "," & py2 & ",20" & " " &
px3 & "," & py3 & ",20" & " " & x & "," & y & ",20"
'Coords = Coords & px1 & "," & py1 & " " & px2 & "," & py2 & ",20" & " " & x & ","
& y & ",20"
PolygonT = Coords
End Function