专栏名称: 完美Excel
Excel与VBA技术学习与实践
目录
相关文章推荐
完美Excel  ·  deepseek使用心得1 ·  昨天  
今天看啥  ›  专栏  ›  完美Excel

将用户窗体保存为PDF

完美Excel  · 公众号  · Excel  · 2024-05-22 12:51
    

文章预览

学习Excel技术,关注微信公众号: excelperfect 标签: VBA , 用户窗体 在网上看到的一段程序,能够将用户窗体保存为 PDF 文件,特辑录于此,供查阅或方便有兴趣的朋友参考。 首先,插入一个标准模块,输入下面的代码: Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Declare PtrSafe Function _  GetActiveWindow &  Lib "user32" () Private Declare PtrSafe Sub GetWindowRect Lib _  "user32" (ByVal hwnd & , lpRect As RECT) Private Declare PtrSafe Function _  GetDesktopWindow &  Lib "user32" () '剪贴板操作 Private Declare PtrSafe Function _  OpenClipboard &  Lib "user32" (ByVal hwnd & ) Private Declare PtrSafe Function _ CloseClipboard & Lib "user32" () Private Declare PtrSafe Function SetClipboardData &  _  Lib "user32" (ByVal wFormat & , ByVal hMem & ) Private Declare PtrSafe Function ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照
总结与预览地址:访问总结与预览