Excel拼写检查详细VBA代码:Private Sub Workbook_Open()MsgBox "选择一个单元格区域,检查该单元格区域内的单词是否拼写正确。"End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)Dim rg As RangeFor Each rg In Target If Not Application.CheckSpelling(StrConv(rg.Value, vbProperCase)) Then rg.Interior.ColorIndex = 3 '英文单词拼写不正确,就变颜色 End IfNext rgEnd Sub