配列の行を分割する方法についてお聞きしたいです。これに遭遇したとき、私はアンケートを作成していました。私がやりたいことは、文字通りコードの行を分割して、それほど長くならないようにすることです
どこから始めればいいのかわからないので、最初のコードは次のとおりです。
Public Sub showQuestion()
Dim letter
Dim X As Integer
Dim Y As Integer
Randomize
question = Array("A programming language originally developed by James Gosling at Sun Microsystems", "A programming language from Microsoft", "Determines when the user wants to do something such as exit the application or begin printing", "Property information", "GUI information and private code")
answer = Array("Java", "Visual_Basic", "Command_Button", "Property_page", "Form")
question = Array("Specifies the background color of the control", "Generally, specifies whether or not a control has a border", "Determines whether or not the control can respond to user-generated events", "For controls displaying text, specifies the font (name, style, size, etc.) to be applied to the displayed text")
answer = Array("BackColor", "BorderStyle", "Enabled", "Font")
question = Array("Specifies the color of text or graphics to be displayed in the control", "Specifies the height of the control in pixels", "The string value used to refer to the control in code", "Specifies the graphic to be displayed in the control")
answer = Array("ForeColor", "Height", "Name", "Image")
qno = Int(Rnd * (UBound(question) + 1))
ReDim ans(Len(answer(qno)), 2)
lblquestion.Caption = question(qno)
For X = 0 To Len(answer(qno)) - 1
ans(X, 1) = Mid$(answer(qno), X + 1, 1)
Next X
For Y = 0 To Len(answer(qno)) - 1
If ans(Y, 1) = "_" Then
ans(Y, 2) = Chr$(32)
Else
ans(Y, 2) = "*"
End If
Next Y
loadHint
End Sub