Tag: scriptcontrol

获取ScriptControl以使用Excel 2010 x64

我试图使用解决这个问题 ,但是,每当我尝试运行最基本的东西,我得到一个Object not Defined错误。 我以为这是我的错(没有安装ScriptControl)。 不过,我试着按照这里所描述的安装,无济于事。 我正在使用Office 2010 64位版本运行Windows 7 Professional x64。

Excel VBA:parsing的JSON对象循环

下面的示例…从parsing的JSONstring中循环一个对象返回一个错误“对象不支持此属性或方法”。 任何人都可以build议如何使这项工作? 非常感谢(我在这里问了6个小时之前寻找答案)。 将JSONstringparsing到对象中的function(此工作正常)。 Function jsonDecode(jsonString As Variant) Set sc = CreateObject("ScriptControl"): sc.Language = "JScript" Set jsonDecode = sc.Eval("(" + jsonString + ")") End Function 循环通过parsing对象返回错误“对象不支持此属性或方法”。 Sub TestJsonParsing() Dim arr As Object 'Parse the json array into here Dim jsonString As String 'This works fine jsonString = "{'key1':'value1','key2':'value2'}" Set arr = jsonDecode(jsonString) MsgBox arr.key1 'Works […]