- Function IIF(express, trueValue, falseValue)
- If express Then
- IIF = trueValue
- Else
- IIF = falseValue
- End If
- End Function
- Dim title
- Dim template
- Dim content
- Dim count
- title = "Valentine's Day Gift"
- template = ""
- template = template & " (\____/)" & vbCrLf
- template = template & " / @[email protected] \" & vbCrLf
- template = template & " ( <OO> )" & vbCrLf
- template = template & " '-,~~,-'" & vbCrLf
- template = template & " / \" & vbCrLf
- template = template & " / love \[email protected]" & vbCrLf
- template = template & " (/ / \ \)" & vbCrLf
- template = template & " WW------WW" & vbCrLf
- template = template & "+----------------------------+" & vbCrLf
- template = template & "| |" & vbCrLf
- template = template & "| {message} |" & vbCrLf
- template = template & "| |" & vbCrLf
- template = template & "+----------------------------+" & vbCrLf
- count = 0
- Do
- count = (count + 1) Mod 5
- content = Replace(template, "{message}", IIF(count = 0, "师太,你就从了老衲吧!", "MM, do you love me? "))
- Loop Until vbYes = MsgBox(content, vbYesNo, title)
- content = ""
- content = content & " __" & vbCrLf
- content = content & " _ / /|" & vbCrLf
- content = content & " |\\ \/_/ I love you too!" & vbCrLf
- content = content & " \_\| / __ By redraiment" & vbCrLf
- content = content & " \/_/__\ .-=='/~\" & vbCrLf
- content = content & "____,__/__,_____,______)/ /{~}}}" & vbCrLf
- content = content & "-,------,----,-----,---,\'-' {{~}}" & vbCrLf
- content = content & " '-==.\}/" & vbCrLf
- MsgBox content, vbYes, title
来源: http://www.phpxs.com/code/1008851/