3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VBAでズンドコ

Posted at

作業が行き詰まってるので現実逃避にズンドコしてみた。

VBAのシンタックスハイライトなんてないのでvbnet指定しております


Option Explicit

Public Sub Zundoko()
    Dim buf As String
    Dim sWord As String
    
    Randomize
    
    Do While True
        If Len(buf) >= 10 Then
            buf = Right(buf, 8)
        End If
        If (Rnd() * 2) < 1 Then
            sWord = "ズン"
        Else
            sWord = "ドコ"
        End If
        Debug.Print sWord
        buf = buf & sWord
        If buf = "ズンズンズンズンドコ" Then
            Debug.Print "キ・ヨ・シ!"
            Exit Do
        End If
    Loop

End Sub

まあ何のひねりもありませんがorz

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?