以下代码将导致
类型不匹配错误
并以黄色突出显示Set Cnt = App...
行。我无法弄清问题是什么,我希望有人可以帮助我。
Dim Sel As Range
Set Sel = Selection
Sel.Offset(1, 2).Select
Range(Selection, Selection.End(xlDown)).Select
Dim Cnt As Variant
Set Cnt = Application.Selection.Cells.Count
Sel = Cnt.Value