sai*_*hna 1 excel vba excel-vba
请告诉我,如何允许用户只在输入框中输入文本.我想在vba代码中使用Application.Inputbox命令.
就像是:
Sub GiveMeData()
Dim s As String
s = Application.InputBox(Prompt:="Type some text: ", Type:=2)
MsgBox s
End Sub
Run Code Online (Sandbox Code Playgroud)
使用它Type可以成为其他类型的有价值的代理,因为您可以解析字符串以测试是否符合格式要求.