以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]菜单权限  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=68835)

--  作者:青鸟
--  发布时间:2015/5/26 8:50:00
--  [求助]菜单权限
我根据帮助文件,在系统菜单_LoadUserSetting事件中加上了如下代码,希望隐藏数据表、管理项目、打印输出功能选项卡工具,并禁用日常工作_窗口功能组和杂项_工具、杂项_执行功能组。其中,红色代码是我加的。用“张海滨”登录后,所有代码都没用执行,而且在编写代码时,菜单设计器的帮助窗口中,也没有对f应的菜单名称提示。请教:这是Foxtable试用版禁用这个功能呢还是我的代码写法有错?
If User.Name = "张海滨" Then
    RibbonTabs("Table").Visible = False
    RibbonTabs("Project").Visible = False
    RibbonTabs("Print").Visible = False
    RibbonTabs("Statistic").Groups("wind").Visible = False
    RibbonTabs("Other").Groups("Tools").Enabled = False
    RibbonTabs("Other").Groups("Execute").Items("SQLExecute").Enabled = False
    RibbonTabs("Other").Groups("Execute").Items("Command").Enabled = False
Else
    RibbonTabs("Table").Visible = True
    RibbonTabs("Project").Visible = True
    RibbonTabs("Print").Visible = True
    RibbonTabs("Statistic").Visible = True
    RibbonTabs("Statistic").Groups("Wind").Visible = True
    RibbonTabs("Other").Groups("Tools").Enabled = True
    RibbonTabs("Other").Groups("Execute").Items("SQLExecute").Enabled = True
    RibbonTabs("Other").Groups("Execute").Items("Command").Enabled = True
End If


--  作者:Bin
--  发布时间:2015/5/26 8:54:00
--  
你的用户名不是  张海滨吧. 具体请上例子
--  作者:大红袍
--  发布时间:2015/5/26 9:15:00
--  
 加入msgbox看是否进入执行对应的代码。