Dim bln As Boolean = True
With Tables("凭证")
If .Current IsNot Nothing
If .Current.IsNull("经手人") Then
MessageBox.Show("请先选择经手人","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
bln = False
End If
For Each itm As RibbonMenu.ContextCommand In e.ContextMenu.Items
itm.Visible = bln
Next
End If
End With
不太清楚你的用途。如果这个代码执行次数较频繁,那么效率比较低了
[此贴子已经被作者于2012-9-26 9:24:08编辑过]