Advertisement
ASP_Volume2 Custom Controls/ Forms/ Menus #35593

Change Font Color On Form

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

AI

AI 요약: 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.

소스 코드
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
원본 댓글 (3)
Wayback Machine에서 복구됨