社区
VBA
帖子详情
help! help! please, VBA for EXCEL
YYboy
2000-08-22 11:30:00
in VBA for Excel, i want to customize commandbarbutton's icon
to a special icn or bmp file, but i do not know how to do,
please help me...
...全文
176
4
打赏
收藏
help! help! please, VBA for EXCEL
in VBA for Excel, i want to customize commandbarbutton's icon to a special icn or bmp file, but i do not know how to do, please help me...
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
YYboy
2000-08-22
打赏
举报
回复
Unl:
clipboard.setdata (LoadPicture("d:\ms.bmp")) //can not pass, have runtime error
cbCmdBar.PasteFace
i am the beginer of DBA, can you write out the source code? thank you
YYboy
Un1
2000-08-22
打赏
举报
回复
先把图象clipboard.setdata然后调用CommandBarButton.pasteface
Un1
2000-08-22
打赏
举报
回复
参考一下:
Private Sub CommandButton1_Click()
set picture = loadpicture("..filename...")
Dim lhwnd As Long
lhwnd = FindWindow(vbNullString, "UserForm1")
Dim hScrDC As Long
hScrDC = GetDC(lhwnd)
Dim hMemDC As Long
hMemDC = CreateCompatibleDC(hScrDC)
Dim xScrn As Integer
Dim yScrn As Integer
xScrn = Width / 15
yScrn = Height / 15
Dim hBitmap As Long
hBitmap = CreateCompatibleBitmap(hScrDC, xScrn, yScrn)
Dim hOldmap As Long
hOldmap = SelectObject(hMemDC, hBitmap)
BitBlt hMemDC, 0, 0, xScrn, yScrn, hScrDC, 0, 0, SRCCOPY
hBitmap = SelectObject(hMemDC, hOldmap)
DeleteDC hScrDC
DeleteDC hMemDC
OpenClipboard lhwnd
EmptyClipboard
SetClipboardData CF_BITMAP, hBitmap
CloseClipboard
Application.CommandBars(3).Controls(1).PasteFace
End Sub
YYboy
2000-08-22
打赏
举报
回复
i can not found clipboard class
CATIA PORTABLE SCRIPT CENTER VERSION 1.5
If you notice something wrong with the code or how is copied in the clipboard (how the text is format), please let me know to improve this
help
file (you can send me a PM in CATIA forums or an e-mail,...
au3反编译源码
*New* full support for AutoIT v3.2.6++ :) ... mmh here's what I merely missed in the 'public sources 3.1.0' This program is for studying the 'Compiled' AutoIt3 format. AutoHotKey was developed from...
尹成Python27天入门到项目实战
复杂逻辑循环while与whileelse编程风格循环控制图形绘制while猜数字输入输出重定向while习题分析可以退出的命令系统for初步简介跑分流程结合for循环小结forfor嵌套forfor分析break中断循环contiune结束本次循环双层...
TeeChart Pro Activex Control v5
TeeChart Pro ActiveX v4 please refer to the 'Upgrading from TeeChart v4.doc' document accessible via the TeeChart Program Manager group. =========================================== Changes for ...
VB编程资源大全(英文源码 控制)
ASP extensions) Microsoft Visual Basic 4.x/5.x/6.x Microsoft Word, Access,
Excel
95/97 (
VBA
) Windows Scripting Host (cscript / wscript) Perl 5.x for Win32 Inprise Delphi 4 ...
VBA
2,462
社区成员
10,807
社区内容
发帖
与我相关
我的任务
VBA
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
复制链接
扫一扫
分享
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章