不太理解楼主的意思,猜猜是不是这个意思?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveCell
If .Value = "请输入" Then
.Value = ""
ElseIf .Value <> "请输入" And .Value <> "" Then
.Value = .Value
Else
.Value = "请输入"
End If
End With
End Sub
或者:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveCell
.Value = IIf(.Value = "请输入", "", IIf(.Value <> "请输入" And .Value <> "", .Value, "请输入"))
End With
End Sub
[此贴子已经被作者于2008-7-29 22:29:45编辑过]