- 帖子
- 472
- 主題
- 5
- 精華
- 0
- 積分
- 485
- 點名
- 0
- 作業系統
- Windows
- 軟體版本
- MS Office
- 閱讀權限
- 100
- 性別
- 男
- 來自
- 香港
- 註冊時間
- 2010-7-4
- 最後登錄
- 2014-12-28

|
比較寫死的方法, 在form上initialize的event加上
Private Sub UserForm_Initialize()
If IsEmpty(Sheets("ini").Range("B5")) Then
UserForm1.Label1.Visible = False
UserForm1.TextBox1.Visible = False
Else
UserForm1.Label1.Caption = Sheets("ini").Range("B5")
End If
If IsEmpty(Sheets("ini").Range("B6")) Then
UserForm1.Label2.Visible = False
UserForm1.TextBox2.Visible = False
Else
UserForm1.Label2.Caption = Sheets("ini").Range("B6")
End If
'以上label/textbox類推.....
End Sub |
|