- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
回復 1# yenwang
不清楚,Main Program中進行後續的計算.
試試看- Public colorarray()
- Sub MainProgram()
- Dim Cnt As Variant
- ColorList
- For Each Cnt In colorarray
- MsgBox Cnt
- Next
- End Sub
複製代碼- Private Sub cmdOk_Click()
- Dim i
- Dim Cnt As Variant '用來取得共有多少checkbox選上
- i = 0
- For Each Cnt In Controls
- If TypeName(Cnt) = "CheckBox" Then
- If Cnt.Value Then
- ReDim Preserve colorarray(0 To i)
- colorarray(i) = Cnt.Tag
- i = i + 1
- End If
- End If
- Next
-
- End Sub
- Private Sub cmdCancel_Click()
- Unload Me
- End Sub
複製代碼 |
|