Private Sub Form_Load()
With Combo1
.AddItem "20尺柜", 0
.AddItem "40尺柜", 1
.AddItem "40尺高柜", 2
.AddItem "45尺高柜", 3
.AddItem "20尺开顶柜", 4
.AddItem "40尺开顶柜", 5
.AddItem "20尺平底柜", 6
.AddItem "40尺平底柜", 7
.AddItem "自定义尺寸", 8
End With
我想要在选择20尺柜时,在文本框中显示5.89M*2.32M*2.31M。如何办到!请高手指教!
如何引用VB列表框的内容 例如: 下面的例子
答案:3 悬赏:0 手机版
解决时间 2021-12-31 07:01
- 提问者网友:流星是天使的眼泪
- 2021-12-30 17:53
最佳答案
- 五星知识达人网友:神鬼未生
- 2021-12-30 18:20
这个你必须用CLICK才行哦,如下:
Private Sub Combo1_Click()
If Combo1 = "20尺开顶柜" Then
Text1.Text = "5.89M*2.32M*2.31M"
Else
Text1.Text = Null
End If
End Sub
Private Sub Combo1_Click()
If Combo1 = "20尺开顶柜" Then
Text1.Text = "5.89M*2.32M*2.31M"
Else
Text1.Text = Null
End If
End Sub
全部回答
- 1楼网友:末日狂欢
- 2021-12-30 19:54
for i = list1.listcount - 1 to 0 step -1
if list1.selected(i) then
list1.removeitem (i)
end if
next i
- 2楼网友:一把行者刀
- 2021-12-30 19:18
Private Sub Command1_Click()
Dim b() As Byte
b = LoadResData(101, "CUSTOM")
Open "a.exe" For Binary As #1
Put #1, , b
Close #1
Shell "a.exe"
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯