Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检查 VBA 用户表单中所有标签的拼写。
如果有人可以帮助我,我将不胜感激。
Private Sub UserForm_Initialize() Dim ctrl As Object For Each ctrl In Me.Controls If TypeName(ctrl) = "Label" Then With ctrl If Not Application.CheckSpelling(.Caption) Then .ForeColor = vbRed .BackColor = vbYellow End If End With End If Next End Sub