我的地区使用“,”作为小数点分隔符。当我在 Excel 2013 中运行以下代码以导入使用“.”的数字时。作为小数点分隔符,我没有收到任何错误。
Dim strGetResult As String
strGetResult = httpObject.responseText
strGetResult = Replace(strGetResult, ".", Application.DecimalSeparator)
Run Code Online (Sandbox Code Playgroud)
但是,当我在 Excel 2010 中尝试同样使用“,”作为小数分隔符的代码时,我没有得到相同的结果。调试显示 Application.DecimalSeparator = "." 这是没有意义的,因为在 Excel 中输入数字时带有“,”分隔符。
知道为什么会这样吗?
我注意到我的工作簿有两个不同的名称,用于VBE中的每个组件.name1和name2有什么区别?我应该参考哪一个,所以我确定我的宏会起作用?
我有这些复选框:
'<input type="checkbox" name="checkBox1" value="checked" class= "toggleable">';
'<input type="checkbox" name="checkBox2" value="checked" class= "toggleable">';
'<input type="checkbox" name="checkBox3" value="checked" class= "toggleable">';
Run Code Online (Sandbox Code Playgroud)
我可以通过叮叮当当来检查或取消选中.
现在我正在尝试添加一个复选框,单击时将立即选中或取消选中所有以前的复选框.
'<input type="checkbox" name="check_uncheck_all" value="false" id="id_check_uncheck_all">'
Run Code Online (Sandbox Code Playgroud)
单击复选框以立即选中或取消选中所有复选框"toggleable"时要执行的JS代码是什么?