设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 11983|回复: 74
打印 上一主题 下一主题

[模块/函数] [原创]可动态添加的辅助录入快捷菜单

[复制链接]
跳转到指定楼层
1#
发表于 2006-8-31 07:01:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
游客,如果您要查看本帖隐藏内容请回复

选定文本后,单击鼠标右键,在快捷菜单中选"添加为新辅助录入选项"可动态添加快捷菜单.快捷菜单中前5项为固定项目,可手动自定义.快捷菜单可自己定义或从本数据库中导入.菜单的执行程序在公共模块"全局代码中".需引用Microsoft Office库.

ublic Function AddNewItem() As Boolean
    Dim ctl As CommandBarButton, Str As String
    Str = Left(Screen.ActiveControl.SelText, 255)
    If Not Len(Str) > 0 Then Exit Function
    If CommandBars("FastSelect").Controls.Count > 20 Then CommandBars("FastSelect").Controls(10).Delete
    Set ctl = CommandBars("FastSelect").Controls.Add(msoControlButton)
    ctl.Caption = IIf(Len(Str) > 20, Left(Str, 20) & "...", Str)
    ctl. & Str & "')"
End Function

ublic Function GetFastSelect(Str As String) As Boolean
On Error Resume Next
    Dim intSelStart As Integer
    intSelStart = Screen.ActiveControl.SelStart
    Screen.ActiveControl.SelText = Str
    Screen.ActiveControl.SelStart = intSelStart + Len(Str)
End Function

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏1 分享分享 分享淘帖 订阅订阅
2#
发表于 2008-1-30 18:46:44 | 只看该作者
??? 可动态添加的辅助录入快捷菜单
3#
发表于 2008-2-2 11:16:20 | 只看该作者
发表于 2006-8-31 07:01  
4#
发表于 2008-2-2 19:14:01 | 只看该作者
谢谢版主分享精品
5#
发表于 2008-2-12 20:30:15 | 只看该作者
6#
发表于 2008-2-14 17:28:57 | 只看该作者
什么都敢想
7#
发表于 2008-3-29 23:53:17 | 只看该作者

thanks

let me try
8#
发表于 2008-3-30 02:50:22 | 只看该作者
[:34] [:50]
9#
发表于 2008-3-30 02:50:36 | 只看该作者
[:22] [:22] ,,真不赖
10#
发表于 2008-3-30 02:51:00 | 只看该作者
[:26] [:27] [:22] ,,赚积分
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-4-28 12:35 , Processed in 0.091087 second(s), 33 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表