您好,指挥官<br>不确定它将如何为您工作<br>乍一看,似乎已按我的意愿工作<br><pre>- Option Explicit
- '' ~~~~~~~~~~~~~~~~''
- Function FindLastRow()
- Dim LastRow As Range
-
- With ActiveSheet
- Set LastRow = .Cells.SpecialCells(xlCellTypeLastCell)
- LastRow.Activate
- End With
- FindLastRow = LastRow.Row
- End Function
- '' ~~~~~~~~~~~~~~~~''
- Function FindLastColumn() As Long
- Dim LastColumn As Range
-
- With ActiveSheet
- Set LastColumn = .Cells.SpecialCells(xlCellTypeLastCell)
- LastColumn.Activate
- End With
- FindLastColumn = LastColumn.Column
-
- End Function
- '' ~~~~~~~~~~~~~~~~''
- Sub FindLastCell()
- Dim LastCell As Range
- With ActiveSheet
- Set LastCell = .Cells(FindLastRow, FindLastColumn)
- End With
- LastCell.Activate
- MsgBox "Last Cell Address: " & vbCr & LastCell.Address
-
- End Sub
仅在Excel2003上测试
Hth
~'J'~ |