早教吧 育儿知识 作业答案 考试题库 百科 知识分享

excelVBA请教各位大虾ubListOfNames()DimiCountAsIntegerDimsNames()AsStringDimiResponseAsIntegerDimiAsIntegeriResponse=vbYesDoWhileiResponse=vbYesiCount=iCount+1ReDimPreservesNames(iCount)AsStringsNames(iCount)=Input

题目详情
excel VBA 请教各位大虾
ub ListOfNames()
Dim iCount As Integer
Dim sNames() As String
Dim iResponse As Integer
Dim i As Integer
iResponse = vbYes
Do While iResponse = vbYes
iCount = iCount + 1
ReDim Preserve sNames(iCount) As String
sNames(iCount) = InputBox("Please enter a name:")
If sNames(iCount) = "" Then
iResponse = MsgBox("Do you wish to quit?", vbYesNo)
If iResponse = vbYes Then
Exit Do
End If
End If
Loop
For i = 1 To iCount - 1
msgbox("Name #" & i & "is" sNames (i))
Next
End Sub
为什么运行的时候msgbox("Name #" & i & "is" sNames (i))
提示我没有分隔符,有谁能帮我解答下么
▼优质解答
答案和解析
参考答案:人之所以能,是相信能.