- 帖子
- 1018
- 主題
- 15
- 精華
- 0
- 積分
- 1058
- 點名
- 0
- 作業系統
- win7 32bit
- 軟體版本
- Office 2016 64-bit
- 閱讀權限
- 50
- 性別
- 男
- 來自
- 桃園
- 註冊時間
- 2012-5-9
- 最後登錄
- 2022-9-28
|
3#
發表於 2013-7-7 15:22
| 只看該作者
本帖最後由 stillfish00 於 2013-7-7 15:24 編輯
回復 1# yutakano
簡單範例: https://www.dropbox.com/s/0yulvt5j01mkjxa/%E7%AF%84%E4%BE%8B.xlsm- Private Sub CommandButton1_Click()
- Static bControl As Boolean '控制是否展開
- bControl = Not bControl
-
- If bControl Then
- CommandButton1.Caption = "選項<<"
- CommandButton1.Top = 100
- ComboBox2.Width = 100
- Label2.Visible = True
- ComboBox1.Visible = True
- CheckBox1.Visible = True
- Else
- CommandButton1.Caption = "選項>>"
- CommandButton1.Top = 36
- ComboBox2.Width = 180
- Label2.Visible = False
- ComboBox1.Visible = False
- CheckBox1.Visible = False
- End If
- End Sub
複製代碼 |
|