I am running Word2000 and Excel2000. Sub A can be called many times from Word. Each time it is called, it figures out what workbook (of several) to open and which sheet for that workbook to explore. The logic that selects the workbook and selects the worksheet works fine. The code to create an Excel object, open the workbook, etc., close the workbook, quit the object, etc., all works fine the first time a given workbook/worksheet are opened and explored. In particular, I determine the last useful row in the target sheet using the standard Find method:
[vba]xlLastRow = xlsheet.Cells.Find("*", xlsheet.Cells(1), _
xlFormulas, xlWhole, xlByRows, xlPrevious).Row[/vba] the value in xlLastRow the first time Sub A is called is correct. But on subsequent calls an error occurs: err = 91; Object variable or With block variable not set. This normally occurs with the above method when the worksheet is blank (not true in this case). I believe the problem is the all-too-common problem with getting the Find method to "initialize".
Any help would be appreciated.