Knowledge Base

Can't Set Bookmarks When Variables Defined as String

Article ID: 135241

Article Last Modified on 10/11/2006


APPLIES TO


This article was previously published under Q135241

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: dimmed dimension XL7

Keywords: kbprogramming KB135241