比較寫死的方法, 在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作者: oobird 時間: 2011-8-4 16:32