MsgBox Val(Workbooks().Worksheets(1).Range("b:b").Find("*", , , , , xlPrevious).Row)'查找最大行号
MsgBox Val(Workbooks().Worksheets(1).Range("b:b").Find("*", , , , , xlPrevious).column)'查找最大列号
存在数据的最大行列号:
Sub 查找数据单元格的最大行列号()
MsgBox "数据单元格的最大行号: " & Cells.Find("*", , , , 1, 2).Row
MsgBox "数据单元格的最大列号: " & Cells.Find("*", , , , 2, 2).Column
End Sub
' ---------计算程序运行所用时间:----------
Sub GetRunTime()
Dim i As Long
Dim dteStart As Date
Dim strTime As String
'关闭屏幕刷新
'Application.ScreenUpdating = False
dteStart = Timer
'---------运行过程主体-------
strTime = Format((Timer - dteStart), "0.00000")
Msgbox "运行过程: " & strTime & "秒"
‘打开屏幕刷新
'Application.ScreenUpdating = True
End Sub
————————————————
版权声明:本文为CSDN博主「一个摩羯座的工匠」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/m0_60646395/article/details/119380743