You are on page 1of 11

10

911
19
18
20
17
1621 812
1522
23
14 7 1
13
24
2512 6 2
11 1
10 5 3 2
26 4 3
9 4
27 8 7 6 5
28
29
30
Springiness 0.6 1
Speed 4 STOP CLOCK

Click the 'Start Clock' button to make the clock


active.

The clock will react to the mouse being moved Clockface


across the yellow area 3 389
4 382.64102173
You can adjust the settings for 5 366
Springiness - How quickly the clock reforms after 6 343
the mouse has caused it to move.
7 318
Speed - How fast the date dial rotates. 8 295.35897827
9 280
10 272.35897827
11 273
12 277
1 281
2 279.64102173
The clock and animation is handled by an
xy scatter chart. The vba code simply updates all
the points for date dial, clock face and hands.

The mouse events are trapped using a label


control that is positioned over the chart. The label Second hand
has been made transparent. 372.51141357
368.57247925
363.63354492
357.69464111
349.75570679
338.81677246
325.87783813
309.93893433

Minute hand
369.07391357
364.72827148
359.38259888
353.03695679
344.6913147
333.34564209

Hour hand
329.04870605
333.03652954
336.02435303
338.01217651
Date dial
118 397.5621 143.8209
138 M 390.1324 153.3533
152.641 I 379.8614 161.3406
158 É 367.1104 167.4337
152.641 R 351.3057 171.3663
138 C 331.9195 172.9665
118 O 310.4493 172.1644
98 L 286.3966 168.9951
83.35898 E 262.2444 163.5971
78 S 237.4363 156.2062
83.35898 214.3574 147.1456
98.99999 1 193.3169 137.8111
4 174.5353 127.6545
159.134 118.1634
S 147.1306 108.8399
E 138.4379 101.1791
P 133.8676 95.64668
150.3607 T 133.1386 92.65941
146.3156 I 134.8896 91.56633
142.2705 E 139.6943 93.63374
138.2254 M 147.0805 99.0335
134.1803 B 155.5507 106.8356
130.1353 R 165.6034 117.0049
126.0902 E 174.7556 129.4029
122.0451 183.5637 142.7938
2 191.6426 157.8544
0 198.6831 173.1889
1 203.4647 188.3455
95.70566 1 206.866 203.8366
99.42138 207.8694 218.16
103.1371
106.8528
110.5686
114.2843

116.6049
116.9537
117.3024
117.6512
0

4
5 3
6 2

7 1

8 12
9 11
10

The clocks are displayed using a xy scatter chart.

There is a line series for each hand and the numbers.

The first clock has a second hand. The second clock has an extra
data series to hold a picture of the clock face

The vba code just updates the sheet which will cause the cells to
update.

The xy positions are done using formula within the cells


55 0 0 70 0
0 3 55 0 0 70
30 2 47.6314 27.5 6 69.61653
60 1 27.5 47.6314 12 68.47033
90 12 3.368E-15 55 18 66.57396
120 11 -27.5 47.6314 24 63.94818
150 10 -47.6314 27.5 30 60.62178
180 9 -55 6.736E-15 36 56.63119
210 8 -47.6314 -27.5 42 52.02014
240 7 -27.5 -47.6314 48 46.83914
270 6 -1E-14 -55 54 41.14497
300 5 27.5 -47.6314 60 35
330 4 47.6314 -27.5 66 28.47157
72 21.63119
0 0 78 14.55382
-192 45 -44.01664 9.356026 84 7.316992
90 4.286E-15
0 0 96 -7.316992
54 35 20.57248 28.31559 102 -14.55382
108 -21.63119
0 0 114 -28.47157
xy scatter chart. -63 30 13.61971 -26.7302 120 -35
126 -41.14497
nd and the numbers. 132 -46.83914
0 138 -52.02014
d. The second clock has an extra START CLOCK 144 -56.63119
e clock face 150 -60.62178
heet which will cause the cells to 156 -63.94818
162 -66.57396
168 -68.47033
ormula within the cells 174 -69.61653
180 -70
186 -69.61653
192 -68.47033
198 -66.57396
204 -63.94818
210 -60.62178
216 -56.63119
222 -52.02014
228 -46.83914
234 -41.14497
240 -35
246 -28.47157
252 -21.63119
258 -14.55382
264 -7.316992
270 -1.29E-14
276 7.316992
282 14.55382
288 21.63119
294 28.47157
300 35
306 41.14497
312 46.83914
318 52.02014
324 56.63119
330 60.62178
336 63.94818
342 66.57396
348 68.47033
354 69.61653
360 70
0 3 2
0
7.316992
14.55382
21.63119
28.47157
35
41.14497
46.83914
52.02014
56.63119
60.62178
63.94818
66.57396
68.47033
69.61653
70
69.61653
68.47033
66.57396
63.94818
60.62178
56.63119
52.02014
46.83914
41.14497
35
28.47157
21.63119
14.55382
7.316992
8.573E-15
-7.316992
-14.55382
-21.63119
-28.47157
-35
-41.14497
-46.83914
-52.02014
-56.63119
-60.62178
-63.94818
-66.57396
-68.47033
-69.61653
-70
-69.61653
-68.47033
-66.57396
-63.94818
-60.62178
-56.63119
-52.02014
-46.83914
-41.14497
-35
-28.47157
-21.63119
-14.55382
-7.316992
-1.71E-14
1
STOP CLOCK

The clock is displayed using a xy scatter chart.

There is a line series for each digit in its lit and unlit state.

The vba code updates the time values

The lines xy positions are done using formula within the cells
0 9 0

235680 -100 1 1.1 1 -100 1 7.1 1


235680 -100 1 2.9 1 -100 1 8.9 1

134567890 -100 1.1 3 1.1 6 1.1 9 1.1


134567890 -100 2.1 3 2.1 6 2.1 9 2.1

12347890 -100 2.4 3 2.4 6 2.4 9 2.4


12347890 -100 3.4 3 3.4 6 3.4 9 3.4

2357890 -100 3.5 2.9 3.5 5.9 3.5 8.9 3.5


2357890 -100 3.5 1.1 3.5 4.1 3.5 7.1 3.5

456890 -100 3.4 1 3.4 4 3.4 7 3.4


456890 -100 2.4 1 2.4 4 2.4 7 2.4

2680 -100 2.1 1 2.1 -100 2.1 7 2.1


2680 -100 1.1 1 1.1 -100 1.1 7 1.1

2345689 -100 2.25 -100 2.25 4.1 2.25 -100 2.25


2345689 -100 2.25 -100 2.25 5.9 2.25 -100 2.25

6.55 1.7 1.1 1 4.1 1 7.1 1


6.55 2.7 2.9 1 5.9 1 8.9 1
12.55 1.7
12.55 2.7 3 1.1 6 1.1 9 1.1
3 2 6 2 9 2

3 2.5 6 2.5 9 2.5


3 3.4 6 3.4 9 3.4

2.9 3.5 5.9 3.5 8.9 3.5


1.1 3.5 4.1 3.5 7.1 3.5

1 3.4 4 3.4 7 3.4


1 2.5 4 2.5 7 2.5

1 2 4 2 7 2
1 1.1 4 1.1 7 1.1

1.1 2.25 4.1 2.25 7.1 2.25


2.9 2.25 5.9 2.25 8.9 2.25
7 0 9

-100 1 13.1 1 -100 1


-100 1 14.9 1 -100 1

12 1.1 15 1.1 18 1.1


12 2.1 15 2.1 18 2.1

12 2.4 15 2.4 18 2.4


12 3.4 15 3.4 18 3.4

11.9 3.5 14.9 3.5 17.9 3.5


10.1 3.5 13.1 3.5 16.1 3.5

-100 3.4 13 3.4 16 3.4


-100 2.4 13 2.4 16 2.4

-100 2.1 13 2.1 -100 2.1


-100 1.1 13 1.1 -100 1.1

-100 2.25 -100 2.25 16.1 2.25


-100 2.25 -100 2.25 17.9 2.25

10.1 1 13.1 1 16.1 1


11.9 1 14.9 1 17.9 1

12 1.1 15 1.1 18 1.1


12 2 15 2 18 2

12 2.5 15 2.5 18 2.5


12 3.4 15 3.4 18 3.4

11.9 3.5 14.9 3.5 17.9 3.5


10.1 3.5 13.1 3.5 16.1 3.5

10 3.4 13 3.4 16 3.4


10 2.5 13 2.5 16 2.5

10 2 13 2 16 2
10 1.1 13 1.1 16 1.1

10.1 2.25 13.1 2.25 16.1 2.25


11.9 2.25 14.9 2.25 17.9 2.25

You might also like