0

コーヒー ショップ プログラムに長さチェックを追加しようとしています... 一部を整理しましたが、どこが間違っているのかわかりません。

Dim Name As String

MsgBox("Welcome. You Are On The 'Hot Mornings' Self-Ordering Service", vbInformation, "Welcome To Hot Mornings!")
        Name = InputBox("Please Enter Your Name", "Welcome To Hot Mornings!", ,     MsgBoxStyle.OkCancel)

If Len(Name <= 3) Then
        Do Until Len(Name > 3)
            MsgBox("Error!", vbExclamation, MsgBoxStyle.OkOnly)
            MsgBox("An Error Occureed Earlier. We Are Currently Trying To fix This     Issue.", vbInformation, "Error!")
            Name = InputBox("Please Enter Your Name.", , "Must Contain More Than 3     Characters", MsgBoxStyle.OkCancel)
        Loop
    End If
4

1 に答える 1

3
Len(Name <= 3) 

このコードは意味がありません。

Name(文字列) が 3 以下かどうかをチェックして (ハァッ?)、Len()そのチェックの結果を取得しています。(は?)

おそらくLen()、文字列 ( Len(Name)) の を取得し、その結果 (数値) が 3 以下かどうかを確認します。

于 2013-01-20T14:27:07.943 に答える