How to use VBA in Excel to get the last cell address?

Users questions: That is, no matter how many rows the table has many columns, get the address should be a square region, the ranks have to take into account, regardless of this last cell does not have content. I like to upload the attachment, for example, the last cell is F12 (although this cell is empty), because since F12 will not have anything after, otherwise it is not the last cell. Such as the F10, E12 is not the last one, because there are content below the F10, and E12 of the F content of the column there. I hope that is applicable to any spreadsheet is, not the file I uploaded this one . Thank you for your answer! But then I also find an answer, that is: ActiveCell.SpecialCells (xlLastCell). Address is in I press the shortcut keys Ctrl + End, when found, so the record with the Record Macro Come to see the code. The shortcut keys to quickly navigate to the last cell.
Experts answer:Sub button 1_ click () MsgBoxSheet1.UsedRange.Cells (Sheet1.UsedRange.Count). Ad dressEndSub
  • This information provided by the users.Thanks!