|
本帖最后由 runzy 于 2015-12-19 19:30 编辑
在线等............急!急!急!32位excel2010中能运行的VBA代码,在64位excel2013中运行不了,跪求各位高手 大侠 老师帮助!(此VBA代码可以计算带注释公式)
Function A(c As Range)
p = c.Text
For j = 1 To Len(p)
F:
If (Mid(p, j, 1) = "【") Then
For i = j + 1 To Len(p)
If (Mid(p, i, 1) = "】") Then
j = i + 1
Exit For
End If
Next
End If
If (Mid(p, j, 1) = "【") Then
GoTo F
End If
r = r + Mid(p, j, 1)
Next
If (r <> "") Then
With CreateObject("MSScriptControl.ScriptControl")
.Language = "vbscript"
A = .Eval(r)
End With
' A = Application.Evaluate("(" & r & ")")
Else
A = ""
End If
End Function
|
|