document.write('<div class="vb" style="font-family: monospace;"><br />');
document.write('<span style="color: #b1b100;">Sub</span> 選択部分再計算<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> Total <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> Counter <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />');
document.write('&nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; Total = Selection.<span style="color: #66cc66;">Cells</span>.<span style="color: #b1b100;">Count</span><br />');
document.write('&nbsp; &nbsp; Counter = <span style="color: #cc66cc;">1</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">For</span> Each SelectedCell In Selection<br />');
document.write('&nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; SelectedCell.<span style="color: #66cc66;">Calculate</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Counter = Counter + <span style="color: #cc66cc;">1</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; Application.<span style="color: #66cc66;">StatusBar</span> = <span style="color: #ff0000;">&quot;しばらくお待ちください。再計算しています。 &quot;</span> &amp; ProgressView<span style="color: #66cc66;">&#40;</span>Counter, Total<span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">Next</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; Application.<span style="color: #66cc66;">StatusBar</span> = <span style="color: #b1b100;">False</span><br />');
document.write('&nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">MsgBox</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;再計算が完了しました。&quot;</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('<br />');
document.write('<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span><br />');
document.write('<br />');
document.write('<span style="color: #b1b100;">Function</span> ProgressView<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">Now</span> <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span>, Total <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> Per <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> Msg <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> Bar <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; Per = <span style="color: #b1b100;">Int</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">Now</span> / Total * <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; Select <span style="color: #b1b100;">Case</span> Per<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">90</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;**********&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">80</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;*********_&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">70</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;********__&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">60</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;*******___&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">50</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;******____&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">40</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;*****_____&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">30</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;***_______&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">20</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;**________&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> Is &gt;= <span style="color: #cc66cc;">10</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;*_________&quot;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #b1b100;">Else</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bar = <span style="color: #ff0000;">&quot;__________&quot;</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">End</span> Select<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; Msg = <span style="color: #ff0000;">&quot; | &quot;</span> &amp; Bar &amp; <span style="color: #ff0000;">&quot; | &quot;</span> &amp; Per &amp; <span style="color: #ff0000;">&quot;% | &quot;</span> &amp; <span style="color: #b1b100;">Now</span> &amp; <span style="color: #ff0000;">&quot; in &quot;</span> &amp; Total &amp; <span style="color: #ff0000;">&quot; | &quot;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; ProgressView = Msg<br />');
document.write('&nbsp; &nbsp; <br />');
document.write('<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Function</span><br />');
document.write('&nbsp;</div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/877/1/" target="_blank">byteMyCode</a>.</div>');
