Foxtable(狐表)用户栏目专家坐堂 → [求助] 执行长代码


  共有2045人关注过本帖平板打印复制链接

主题:[求助] 执行长代码

帅哥哟,离线,有人找我吗?
zcgmxf
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1636 积分:14489 威望:0 精华:0 注册:2014/6/6 8:42:00
[求助] 执行长代码  发帖心情 Post By:2018/12/22 9:57:00 [只看该作者]

老师,是否可以将一段代码定义为字符串,然后去执行。如果可以改如何处理?谢谢!

        rt1.Cells(t1+tt1+45,0).SpanCols = 10
        rt1.Cells(t1+tt1+45,0).Text = "神经系统常规检查"
        rt1.Rows(t1+tt1+45).Height = 9
        rt1.Rows(t1+tt1+45).Style.BackColor = Color.OliveDrab
        rt1.Cells(t1+tt1+45,0).Style.TextAlignHorz = prt.AlignHorzEnum.Center
        rt1.Cells(t1+tt1+45,0).Style.TextAlignVert = prt.AlignVertEnum.Center
        rt1.Cells(t1+tt1+45,0).Style.Font = New Font("宋体", 12, FontStyle.Bold)
        rt1.Rows(t1+tt1+45).Style.GridLines.top = New Prt.LineDef(0.1, Color.Gray)

    Dim s9 As String 
    s9 = " rt1.Cells(t1+tt1+45,0).SpanCols" & " = " & "10" & _
        "rt1.Cells(t1+tt1+45,0).Text" & " = " & "神经系统常规检查" & _
        "rt1.Rows(t1+tt1+45).Height" & " = " & "9" & _
        "rt1.Rows(t1+tt1+45).Style.BackColor = Color.OliveDrab " & _
        "rt1.Cells(t1+tt1+45,0).Style.TextAlignHorz = prt.AlignHorzEnum.Center " & _
        "rt1.Cells(t1+tt1+45,0).Style.TextAlignVert = prt.AlignVertEnum.Center" & _
        "rt1.Cells(t1+tt1+45,0).Style.Font" & " = " & "New Font( " & "宋体" & "," & " 12, FontStyle.Bold) " & _
        "rt1.Rows(t1+tt1+45).Style.GridLines.top" & " = " & "New Prt.LineDef(" & "_0.1" & "," & " Color.Gray" & ")" 
    If s.Contains("神经系统常规") Then
       s9  ‘ 执行上面的那段代码,这里改如何写代码
    end if

 回到顶部