I normally use something like this

    Dim wSheet As ExcelWorksheet
    wSheet = wBook.ActiveSheet
    maxRow = wSheet.UsedRange.Rows.Count
    maxCol = wSheet.UsedRange.Columns.Count

It's usually quite helpful, though you still need to check the contents,
because UsedRange can get extended if Excel thinks an empty cell somewhere
has a format.

--
Steve Garman
Using REALbasic 2006r2 Professional on Windows XP Pro



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to