如何适合大型用户表单以在 VBA 中打印 [英] How fit a large userform to print in VBA

查看:46
本文介绍了如何适合大型用户表单以在 VBA 中打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VBA 中有一个很大的用户表单,我已经在表单上有一个打印"选项,可以打印一半的表单.

I have a large user form in VBA, Already I have a "print" option on the form which prints half of the form.

请告诉我如何在 2 页中打印横向和整个表格.

Please let me know how I can print landscape and the whole form in 2 pages.

谢谢

推荐答案

Userform PrintForm 方法不提供任何选项.另一方面,工作表提供了无数的选项.

The Userform PrintForm method doesn't offer any options. Worksheet's on the other hand provide a myriad of options.

我会使用 AltPrintScreen 将用户窗体的图像复制到 Windows 剪贴板,然后将其作为图像粘贴到工作表中.

I would use AltPrintScreen to copy the Userform's image to the Windows ClipBoard and then paste it to a worksheet as an image.

Private Sub btnCopyUserformBitMap_Click()
    Application.SendKeys "(%{1068})"

    DoEvents
    Application.Wait Now + TimeSerial(0, 0, 1)

    Worksheets("Print Userform").Range("A1").PasteSpecial
End Sub

这篇关于如何适合大型用户表单以在 VBA 中打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆