The information in this article applies to:
SYMPTOMSWhen you record a Visual Basic for Applications macro in Microsoft Excel 97, numbers in the recorded code may be followed by number signs (#), as in the following example:
CAUSEIf the values are the Double type, Microsoft Excel 97 adds number signs to values when you record a macro. Microsoft Excel adds number signs only to values that are whole numbers followed by ".0" (for example, 6.0, 118.0, and so on). This behavior does not occur when values are not whole numbers (for example, 27.75 or 15.5). RESOLUTIONThe number signs in the recorded macro do not cause any problems, and it is not necessary to remove them. However, you can remove the number signs without affecting the functionality of the macro. STATUSThis behavior is by design of Microsoft Excel 97. MORE INFORMATIONIn Visual Basic for Applications, number signs are used to indicate that the number to which they are attached is the Double type, for example:
When you record a Visual Basic for Applications macro, Microsoft Excel may
automatically set recorded numbers that are whole numbers to the Double
type by adding a number sign after each number. This behavior does not
affect the functionality of the macro in any way.
You can also observe this behavior by typing the following subroutine into a new Visual Basic module:
When you enter the third line of code, the values in the line are converted
into the Double type:
This is an automatic feature in Visual Basic for Applications. If you enter
the following line of code instead
the values are not converted into the Double type, because the values do
not end in ".0."
Additional query words: XL97 single variant integer long pound symbol
Keywords : kbcode kbprg xlvbainfo xldraw |
Last Reviewed: November 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |