XL7: Can't Set Bookmarks When Variables Defined as String

Last reviewed: September 2, 1997
Article ID: Q135241
The information in this article applies to:
  • Microsoft Excel for Windows 95, version 7.0

SUMMARY

When you assign a variable to a bookmark as a String data type, if you are using Data Access Objects (DAO) in a Visual Basic for Applications module, the following error message will be displayed:

   Not a valid bookmark.

WORKAROUND

To work around this problem, declare the variable assigned to the bookmark as a Variant data type, as in the following example:

   Dim MyBookMark As Variant


Additional query words: 7.00 dimmed dimension
Keywords : kbprg PgmOthr xlwin kbcode
Version : 7.00
Platform : WINDOWS


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: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.