Hi All,
I am trying to find last used column address from an excel sheet, but I am not getting proper cell address. I am using MS Access 2003 and please find following code snippet that I used for finding the last column.
(ColumnFound - used with "cells.find" to get particular row position from the sheet.)
Range(ColumnFound.AddressLocal).Select
Do Until IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
Msgbox(ActiveCell.AddressLocal)
I have around 30 sheets in a workbook, some sheets this code is working correct but some sheets it giving wrong result. I am not sure what wrong with code/excel sheet. Please anyone help me to solve this issue.
Regards,
Selvakumar R