Revision 24f83d62-9fc0-4e82-91a9-2dc53e94e6ff - Code Golf Stack Exchange
VBA 32-bit, <sub><s>159</s> <s>157</s> <s>143</s> <s>141</s></sub> 134 Bytes
=
<!-- language-all: lang-vba -->
VBA does not have a built in function that allows for waiting for time periods less than one second so we must declare a function from `kernel32.dll`
__32 Bit Declare Statement (41 Bytes)__
Declare Sub Sleep Lib"kernel32"(ByVal M&)
__64 Bit Declare Statement (49 Bytes)__
Declare PtrSafe Sub Sleep Lib"kernel32"(ByVal M&)
Additionally, we must include a `DoEvents` flag to avoid the infinite loop from making Excel appear as non-responsive. The final function is then a subroutine which takes no input and outputs to the VBE immediate window.
__Immediate Window function, 93 Bytes__
Anonymous VBE immediate window function that takes no input and outputs to the range `A1` on the ActiveSheet
s="... .... .":Do:DoEvents:Sleep 100:[A1]="["&Mid(s,10-i,10)&"]":i=(i+1)Mod 10:Loop
###Old Version, 109 Bytes
Immediate window function that takes no input and outputs to the VBE immediate window.
s="... .... .":i=0:Do:DoEvents:Sleep 100:Debug.?"["&Mid(s,10-i,10)&"]":i=(i+1) Mod 10:Loop
__Ungolfted and formatted__
Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal M&)
Sub a()
Dim i As Integer, s As String
s = "... .... ."
i = 0
Do
Debug.Print [REPT(CHAR(10),99]; "["; Mid(s, 10 - i, 10); "]"
DoEvents
Sleep 100
i = (i + 1) Mod 10
Loop
End Sub
_-2 Bytes for removing whitespace_
_-30 Bytes for counting correctly_
_-14 Bytes for converting to immediate window function_
__Output__
_The gif below uses the full subroutine version because I was too lazy to rerecord this with the immediate window function._
[![VBA loading Gif][1]][1]
[1]: https://i.sstatic.net/zCSuM.gif