루프를 수행합니다 사용자 만 "P 플러스 4 임의의 숫자"를 입력Qestion 내가 하나 개의 까다로운 질문이
* (예 : P1234)에서 InputBox에 * 유효한 코드로 간주하고 매크로를들이받은 중지 유효한 코드가 입력 될 때까지 실행되지 않는 한. 나는 거의 다했다고 생각하지만 여전히 문제가 거의 없다. 내 코드는 다음과 같다.
Sub asd()
Dim strcode As String
Dim strnumber As string
strcode = InputBox("what is your production code?")
Do Until strcode = InStr(1, strcode, "P",vbBinaryCompare) And Len(strcode) = 5 _
and strnumber = Mid(strcode, 2) and IsNumeric (strnumber)
strcode = InputBox("what is your production code?")
Loop
End Sub
대단히 감사합니다!
"한가지 까다로운 질문이 있습니다." 나는 '까다로운'부분이 처음부터 질문을 찾는다고 추정한다. ;) – Brian
'Do Until Ucase (strcode)는 "P ####"' –
과 같이 정말 고마워요 !!!! – Mars