Arrange WordArt and Shapes in a Circle in Excel Using VBA
Question details
Arrange multiple WordArt objects or shapes in a circle and create a customizable clock face using VBA.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants to calculate circular positions for worksheet objects and animate clock hands.
- Observed behavior
- Shapes are evenly distributed around a circle, and a clock face displays hands that update over time.
Open the workbook in a desktop version of Excel that supports VBA, enable macros if prompted, and save it as an Excel Macro-Enabled Workbook (.xlsm). Use Alt+F11 to open the VBA editor; the examples below do not require a Microsoft Forms reference.
Arrange selected WordArt or shapes around a circle
Use this macro to distribute existing worksheet objects evenly around a circle.
The macro uses the center of the selected objects' bounding area as the circle's center. Change the radius value in the code to adjust the layout.
Press Alt+F11, select the workbook in the Project pane, and choose Insert > Module.
Paste this code into the module: Sub ArrangeShapesInCircle() Dim sr As ShapeRange, s As Shape Dim cx As Double, cy As Double, radius As Double Dim angle As Double, pi As Double, i As Long On Error Resume Next Set sr = Selection.ShapeRange On Error GoTo 0 If sr Is Nothing Then MsgBox "Select two or more shapes or WordArt objects first." Exit Sub End If If sr.Count < 2 Then MsgBox "Select two or more objects first." Exit Sub End If radius = 150 ' Points; adjust as needed pi = 4 * Atn(1) cx = sr.Left + sr.Width / 2 cy = sr.Top + sr.Height / 2 For i = 1 To sr.Count Set s = sr.Item(i) angle = -pi / 2 + 2 * pi * (i - 1) / sr.Count s.Left = cx + radius * Cos(angle) - s.Width / 2 s.Top = cy + radius * Sin(angle) - s.Height / 2 Next i End Sub
Return to the worksheet, select multiple shapes or WordArt objects, then open Developer > Macros, select ArrangeShapesInCircle, and click Run.

Create an updating clock face with VBA
Use this self-contained example to create a numbered clock on a worksheet and update its hands every second.
Work with spreadsheet shapes in WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface for working with spreadsheets and shapes. Its Excel format support helps with migration, though Excel VBA macros and scheduled animations may not run the same way in WPS.

Frequently Asked Questions
How do I select multiple shapes before running the macro?
On the worksheet, select one shape and hold Ctrl while selecting the others. Then choose Developer > Macros and run ArrangeShapesInCircle.
Can I place 60 markers around the clock face?
Yes. In StartClock, change the loop to For i = 1 To 60 and change the angle calculation to use 60 positions. You may also want to use smaller markers or label only selected positions.
Do these examples need the Microsoft Forms library?
No. These examples use standard Excel VBA and do not use Forms controls. A different sample with scroll bars may require a Microsoft Forms reference in Tools > References.
Why did the clock stop updating?
The clock requires Excel and the workbook to remain open and macros to be enabled. Run StartClock again from Developer > Macros after reopening the workbook.
How can I keep the VBA code when saving?
Choose File > Save As and select Excel Macro-Enabled Workbook (.xlsm). A standard .xlsx file cannot retain VBA code.




