首页 > 代码库 > Excel中输入1时单元格显示为勾

Excel中输入1时单元格显示为勾

如图:

技术分享

 

 1 Private Sub Worksheet_Change(ByVal Target As Range) 2     On Error Resume Next 3     Application.EnableEvents = False 4     For Each c In Target.Cells 5         With c 6         For i = 1 To 30 7          If Cells(i, 1) = 1 Then 判断是否在第1列(a列)输入数据. 8            Value = http://www.mamicode.com/""10             End If11                  12             Next13          End With14     Next15     Application.EnableEvents = True16 End Sub

 

Excel中输入1时单元格显示为勾