菜单Selecttab事件代码如下:If DataTables.Contains(RibbonTabs.SelectedTab.Name) = False Then '如果表C没有加载
DataTables.Load(RibbonTabs.SelectedTab.Name) '加载表C
End If
MainTable = Tables(RibbonTabs.SelectedTab.Name)
Dim itm As Object
For Each itm In RibbonTabs(RibbonTabs.SelectedTab.Name).Groups(RibbonTabs.SelectedTab.name).Items
With RibbonTabs(RibbonTabs.SelectedTab.Name).Groups(RibbonTabs.SelectedTab.Name).Items(itm.name)
If RibbonTabs.SelectedTab.Name <> "主界面" OrElse RibbonTabs.SelectedTab.Name <> "月末报表" Then
If TypeOf itm Is RibbonMenu.ComboBox Then
If DataTables(RibbonTabs.SelectedTab.Name).DataCols(itm.name).IsBoolean = False Then
.Items.Clear
For Each c As String In DataTables(RibbonTabs.SelectedTab.Name).SQLGetValues(itm.name, "", itm.name)
Dim b As New RibbonMenu.Button(c)
b.Text = c
.Items.Add(b)
Next
End If
End If
End If
End With
Next
前期没问题 ,今天忽然出现错误提示:
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2022.8.18.1
错误所在事件:菜单,SelectTab
详细错误信息:
未设置对象变量或 With 块变量。
没分析出是什么原因导致,请老师指导