Function CellType(Rng)
Dim Cella As Range
Set Cella = Rng.Range("A1")
Select Case True
Case IsEmpty(Cella)
CellType = "Blank"
Case Application.IsText(Cella)
CellType = "Text"
End Select
End Function
Sub 类型()
Dim a As Variant
a = CellType(Selection)
MsgBox "该类型为:" & a, vbInformation
End Sub
忽然笑
杨魅力