PRB: 16-Bit Microsoft Excel ISAM Requires Named Ranges

Last reviewed: May 20, 1996
Article ID: Q145680
The information in this article applies to:
  • Professional and Enterprise Editions of Microsoft Visual Basic, 16-bit only, for Windows, version 4.0

SUMMARY

The 16-bit Microsoft Excel ISAM (MSXL2016.DLL) included with Visual Basic 4.0 requires that all ranges to be accessed be previously named from within Microsoft Excel. This is in contrast to the 32-bit Excel ISAM (MSXL3032.DLL), which is able to accept an ad-hoc range as the name of a table, for example "Sheet1$A1:E5".

STATUS

This behavior is by design.

RESOLUTION

Name all ranges to be accessed in Microsoft Excel before attempting use from the 16-bit Microsoft Excel ISAM. This can be accomplished by starting Microsoft Excel, loading the desired workbook, selecting the desired range, clicking Insert Name Define on the Insert menu, and entering the name of the range. The name you enter becomes the name of the data table attached or opened using the Microsoft Excel ISAM. If this is not an option, one can use OLE Automation to Microsoft Excel to manually retrieve the desired data. Note that this method will require that Microsoft Excel exist on all machines which execute the program. For more information on using OLE Automation to Microsoft Excel (and other Office products) please see the following article(s) in the Microsoft Knowledge Base:

   ARTICLE-ID: Q122734
   TITLE     : Article List for VB: OLE

REFERENCES

"Accessing Data in a Microsoft Excel Worksheet or Workbook," Visual Basic 4.0 online help.


Additional reference words: 4.00 vb4win vb416
KBCategory: kbusage kbprb
KBSubcategory: APrgDataIISAM


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 20, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.