Dim code As String
For Each dr As DataRow In DataTables("表A").DataRows
If dr("功能区") = 菜单 And dr("菜单组件名称") = 按钮 Then
code = dr("代码") & vbcrlf
code = code & "Return Nothing"
Functions.add("zhi",code)
Functions.complie()
Functions.Execute("zhi")
Return
End If
Next
Functions.remove("zhi")
Dim code1 As String
For Each dr As DataRow In DataTables("表C").DataRows
Dim itm As RibbonMenu.RibbonItem
For Each itm In QAT.Items
If itm.Name =(dr("访问栏组件名称")) Then
code1 = dr("代码编辑器") & vbcrlf
code1 = code1 & "Return Nothing"
Functions.Add("dtsc",code1)
Functions.Complie()
Functions.Execute("dtsc")
Functions.remove("dtsc")
Return
End If
Next
Next
Functions.remove("dtsc")
Dim code2 As String
For Each dr2 As DataRow In DataTables("配置栏").DataRows
Dim item As RibbonMenu.RibbonItem
For Each item In ConfigBar.Items
If item.Name =(dr2("配置栏组件名称")) Then
code2 = dr2("代码编辑器") & vbcrlf
code2 = code2 & "Return Nothing"
Functions.Add("dtsc1",code2)
Functions.Complie()
Functions.Execute("dtsc1")
Functions.remove("dtsc1")
Return
End If
Next
Next
Functions.remove("dtsc1")