问题描述
我对vba宏有问题.单元格包含值941144280284022000000.但是,当尝试在宏中获取此值时,变量等于9.41144280284022E + 20.是否有可能获得真实"价值?谢谢.
I have an issue with vba macros. Cell contains value 941144280284022000000. But when try to get this value in macros, variable is equal9.41144280284022E+20. Is it possible to get "real" value?Thanks.
推荐答案
以下是示例:
Sub dural()
MsgBox ActiveCell.Text
End Sub
这将确保数字的长字符串不会转换为数字.
This will insure that long strings of numerals are not converted to numbers.
EDIT#1:
这假定单元格实际上显示一长串数字.如果单元格显示 #### ,则该子菜单将拾取该内容.如果单元格显示 9.41E + 20 ,则这就是我的订阅者要接听的内容.
This assumes that the cell actually displays the long string of numerals. If the cell displays ####, that is what the sub will pick-up. If the cell displays 9.41E+20, then that is what my sub will pick-up.
我的订阅者不一定不一定会领取公式栏的内容.
My sub will not necessarily pick-up the contents of the Formula Bar.
这篇关于从单元获取价值而无需在vba宏中进行转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!