Private Sub count_of_rc()
Set wbi = ActiveWorkbook
Range("A1").Select
Selection.CurrentRegion.Select
tr = Cells(1, 1).CurrentRegion.Rows.Count
tc = Cells(1, 1).CurrentRegion.Columns.Count
End Sub
显示下标超出范围
答案 0 :(得分:1)
从代码中删除Private
关键字。