View Single Post
  #4  
Old 06-07-2018, 02:40
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 145
Default

Code:
Sub FillRandomCircles()
Const MaxSize = 15 'max radius of ellipse, i.e. MinSize + MaxSize
Const MinSize = 5  'min radius
Dim s As Shape, x#, y#, w#, h#, z&
    ActiveDocument.Unit = cdrMillimeter
    ActivePage.GetBoundingBox x, y, w, h
    Randomize
    For z = 1 To 100
        Set s = ActiveLayer.CreateEllipse2(x + Rnd * w, y + Rnd * h, Rnd * MaxSize + MinSize)
    Next
End Sub
Reply With Quote