高手帮我看看这段代码怎么了,我怎么也想不明白了
'pStrFormula="1+2"
Private Sub CalCulate(ByVal pFeature As IFeature, ByVal pStrFormula As String)
Try
Dim pResult As Double Dim pStrSub As System.Text.StringBuilder
pStrSub = New System.Text.StringBuilder
pStrSub.Append("Sub CalThis()")
pStrSub.Append(Chr(13))
pStrSub.Append(Chr(10))
pStrSub.Append(" pFeature.Value(pFeature.Fields.FindField(UltraLabel4.Text.Replace("" = "", """"))) = ")
pStrSub.Append(pStrFormula)
pStrSub.Append(Chr(13))
pStrSub.Append(Chr(10))
pStrSub.Append("End Sub") AxScriptControl1.AddCode(pStrSub.ToString)
AxScriptControl1.Run("CalThis()", Nothing) Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.Information, "提示")
End Try
End Sub
'pStrFormula="1+2"
Private Sub CalCulate(ByVal pFeature As IFeature, ByVal pStrFormula As String)
Try
Dim pResult As Double Dim pStrSub As System.Text.StringBuilder
pStrSub = New System.Text.StringBuilder
pStrSub.Append("Sub CalThis()")
pStrSub.Append(Chr(13))
pStrSub.Append(Chr(10))
pStrSub.Append(" pFeature.Value(pFeature.Fields.FindField(UltraLabel4.Text.Replace("" = "", """"))) = ")
pStrSub.Append(pStrFormula)
pStrSub.Append(Chr(13))
pStrSub.Append(Chr(10))
pStrSub.Append("End Sub") AxScriptControl1.AddCode(pStrSub.ToString)
AxScriptControl1.Run("CalThis()", Nothing) Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.Information, "提示")
End Try
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货