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.

適用對象

ComboBox 物件

Report 物件

CommandButton 物件

TabControl 集合物件

FormatCondition 物件

TextBox 物件

Label 物件

ToggleButton 物件

ListBox 物件

您可以使用 FontBold 屬性,指定在下列情況下,字型是否會以粗體樣式顯示:

  • 顯示或列印表單或報表上的控制項時。

  • 在報表上使用 Print 方法時。

備註

FontBold 屬性使用下列設定。

設定

描述

True

文字為粗體。

False

(預設) 文字不是粗體。


附註: 您只能使用巨集或 Visual Basic for Applications (VBA) 程式碼來設定 FontBold 屬性。

若要在報表上使用 FontBold 屬性,請先建立一個可列印所需文字的 Print 事件程序。

根據您的電腦和印表機而定,字型在螢幕上及列印時的外觀可能會不同。

FontWeight 屬性 (可在控制項的屬性工作表中取得) 也可以用來設定控制項文字的線條寬度。 FontBold 屬性可讓您快速將文字變成粗體;FontWeight 屬性可讓您更精確地控制文字的線條寬度設定。 下表顯示這些屬性設定之間的關聯性。

If

Then

FontBold = False

FontWeight = Normal (400)

FontBold = True

FontWeight = Bold (700)

FontWeight < 700

FontBold = False

FontWeight > = 700

FontBold = True


範例

下列 Print 事件程序會在報表中 CurrentXCurrentY 屬性設定所指定的座標上,以粗體樣式列印報表標題和目前的日期。

Private Sub ReportHeader0_Print(Cancel As Integer, _
PrintCount As Integer)
Dim MyDate
MyDate = Date
Me.FontBold = True
' Print report title in bold.
Me.Print("Sales Management Report")
Me.Print(MyDate)
End Sub

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!

×