Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

適用對象

CheckBox 物件

OptionButton 物件

ToggleButton 物件

您可以使用 TripleState 屬性指定核取方塊、切換按鈕或選項按鈕將如何顯示 Null 值。 讀/寫布林值

expression.TripleState

運算式 必要。 傳回 [套用至] 清單中其中一個對象的表達式。

備註

TripleState 屬性使用下列設定。

設定

Visual Basic

描述

Yes

True

此控制項會將狀態循環顯示為 Yes、No 和 Null 值。 此控制項在其 Value 屬性設定為 Null 時會變暗 (灰色)。

No

False

(預設) 此控制項會將狀態循環顯示為 Yes 和 No 值。 Null 值的顯示方式如同 [否] 值。


附註: 您可以使用控制項的屬性工作表、巨集或 Visual Basic for Applications (VBA) 程式碼來設定 TripleState 屬性。

此屬性可以在任何檢視中設定。

範例

下列範例會顯示一個訊息,詳細說明 "frmOperations" 表單上,名稱為 "Check1" 之核取方塊的狀態。

Dim strTripleState As String
strTripleState = Forms.Item("frmOperations").Controls.Item("Check1").TripleState
Select Case strTripleState
Case True
MsgBox "For Check1, TripleState = " & strTripleState & _
". The control will cycle through states for Yes, No, " & _
"and Null values. The control appears dimmed (grayed) " & _
"when its Value property is set to Null."
Case False
MsgBox "For Check1, TripleState = " & strTripleState & _
". The control will cycle through states for Yes and No " & _
"values. Null values display as if they were No values."
Case Else
MsgBox "Can't determine the TripleState property for Check1."
End Select

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×