看来你们还没有理解到我的题意,可能我说的不清楚,这个问题是群的虎子提出来的,我回答了,我把我的回答贴一下:期待有更多的方法中。。。。。
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
For h = 1 To 20
If Cells(h, 1) = "" Then
Cells(h, 1) = "订单号"
Cells(h, 1).Font.ColorIndex = 37
End If
Next
If Target.Column = 1 Then
I = Target.Row
Cells(I, 1) = ""
Cells(I, 1).Font.ColorIndex = 1
MsgBox "请输入订单号了"
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
'先把区域输入"订单号"和浅蓝色字体
For h = 1 To 20
If Cells(h, 1) = "" Then
MsgBox "你还没有输入订单号码"
End If
Next
If Target.Column = 1 Then
I = Target.Row
Cells(I, 1) = ""
Cells(I, 1).Font.ColorIndex = 1
MsgBox "请输入订单号了"
End If
End Sub