Advertisement
3_2004-2005 Custom Controls/ Forms/ Menus #140890

Change Font Color On Form

This code will change the forecolor for Labels and Textboxes (can be edited for Other Controls).

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
Sub ChangeFont(frm As Form, color As String)
On Error GoTo errhand
Dim Control
For Each Control In frm.Controls
If TypeOf Control Is Label Then Control.ForeColor = color
If TypeOf Control Is TextBox Then Control.ForeColor = color
Next Control
Exit Sub
errhand:
MsgBox "Error Changing Font Color!", vbCritical
End Sub
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı