返回列表 上一主題 發帖

[發問] CheckBox 及 optionbutton 點選選項後 可否設計帶出textbox 輸入資料

回復 10# GBKEE


    謝謝您,這已幫助我很多,   
只是,是否選 ListBox1 後 若要取消, 只能輸0表示,無法恢復未選狀態吧!
真羨慕您們的功力,
很想請教您們要如何練功(找書?),我來日問題才少一點,日後才有能力回饋一下別人,
謝謝!
max

TOP

回復 11# user999
ListBox1 後 若要取消, 只能輸0表示,無法恢復未選狀態吧!
修改如下
  1. Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
  2.     Dim ListText As Integer, i As Integer
  3.     i = ListBox1.ListIndex
  4.     ListText = Val(ListBox1.List(i, 1))
  5.     ListText = Application.InputBox("請輸入數字 : ", ListBox1.List(i), ListText, Type:=1)
  6.     If ListText >= 0 Then
  7.         If ListText > 0 Then ListBox1.List(i, 1) = ListText    '>0 輸入數值
  8.         If ListText = 0 Then ListBox1.List(i, 1) = ""          '=0 清除內容
  9.     End If
  10.     Ar(ComboBox2.ListIndex) = Application.Transpose(Application.Transpose(ListBox1.List))
  11.                                           '品別陣列的索引之陣列 = ListBox1
  12.     ITEM(ComboBox1.ListIndex) = Ar        '店別陣列的索引之陣列 = 品別陣列
  13.     顯示計數
  14. End Sub
複製代碼

TOP

回復 12# GBKEE


    謝謝您的協助!
max

TOP

        靜思自在 : 要批評別人時,先想想自己是否完美無缺。
返回列表 上一主題