Program is simple, but I recommend you to study about Visio through the
references presented in MSDN online,
(
http://msdn2.microsoft.com/en-us/library/aa245244(office.10).aspx ),
help in Visio application, or Visio sdk.
Othewise, you have to waste your time for questioning line by line.
Dim shp As Visio.Shape
Dim I As Long, N As Long
N = ActivePage.Shapes.Count
For I = N To 1 Step -1
ActivePage.Shapes(I).Delete
Next