Setting Text Font Using VBA

Question

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

 If Lang = "P" Then

    Text15 = [books.name_p]

    Text15FontName ‘i want to set font name here kindly help

Else If Lang = "E" Then

    Text15 = [books.name_e]

Else

    Text15 = [books.name_h]

End If

End Sub

This is my code. I want to set a font name here and I do not know which property to use.

 

Solution

 To set a Font in VBA, use the following:

 Me!Text.FontName = "Courier"

Do you like this tip? Subscribe to my free Newsletter to receive tips via email. Click Here to subscribe.