XL97: Using "Checked", "Gray", and "Unchecked" in MacrosID: Q157755
|
In Microsoft Excel 97, when you run a Visual Basic for Applications macro, you may receive the following error message:
Compile error:
Invalid Qualifier
This behavior occurs when the following conditions are both true:
[Checked].Value = xlOn
You can avoid this problem by performing either of the following:
[Unchecked].Value = xlOff
and "Unchecked" is the name of a check box within your custom dialog
box, change the line to read:
ActiveDialog.Checkboxes("Unchecked").Value = xlOff
If you do this throughout your macro code, you can still use controls
named "Checked", "Gray", and "Unchecked".
In earlier versions of Microsoft Excel, the words "Checked", "Gray", and
"Unchecked" have no special meaning. However, in Microsoft Excel 97, these
three words are global constants belonging to the Stdole Type Library.
Because of this, it is not possible to refer to these constants by
enclosing them in brackets when running a macro in Microsoft Excel 97. Use
either of the workarounds shown above to eliminate this problem.
Additional query words: XL97 8.00
Keywords : kberrmsg kbprg kbdta kbdtacode KbVBA xlvbmigrate
Version : WINDOWS:97
Platform : WINDOWS
Issue type :
Last Reviewed: July 2, 1999