[VB代码]弹出输入框 输入内容显示在label1 当中

2025-03-04 19:59:24
推荐回答(4个)
回答1:

Private Sub Command1_Click()
dim a as integer
a=inputbox("输入数字")
label1.caption=a
End Sub

回答2:

Private Sub Command1_Click()
Label1.Caption = InputBox("请输入数字")
End Sub

回答3:

Option Explicit

Private Sub Command1_Click()
Dim a
a = InputBox("prompt", "title")
Label1.Caption = a
End Sub

回答4:

Label1.Caption = InputBox("请输入数字")