打印区域选择器 [英] Print area selector

查看:74
本文介绍了打印区域选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好


今天的问题。我有一个命令按钮"打印选择"打开UserForm,此UserForm有2个日期选择器"Date From"和"Date To",带有取消和打印按钮。


我正在尝试计算代码,以便在选择两个日期并按下打印时,这些日期之间的数据是打印以及一些其他强制性数据"名称"等等。


我的工作表:


列A1:E14保存个人数据,无论从日期选择器中选择什么,每次都需要打印。


列F1:NG14保存需要打印的信息。这些日期仅适用于当前年份,所以我还想要一个消息框警告,在当前年份之外选择的任何日期都不起作用。


我希望这是有道理的。  ;


Steve


解决方案

作为额外的,我忘了提及日期是从B3中的日期生成的。例如:


计算天数: - 单元格F2 = B3,单元格G2 = F2 + 1,单元格H3 = G2 + 1等。日期行以类似方式计算。 / p>


Morning all

Today's problem. I am have a command button "Print Selection" which opens a UserForm, this UserForm has 2 date pickers "Date From" and "Date To", with Cancel and Print Buttons.

I am trying to work out the code so that when the two dates are selected and print is pushed the data between these dates is printed as well as some other mandatory data "Names" etc.

My worksheet:

Columns A1:E14 hold personal data and requires to be printed each time no matter what is selected from the date pickers.

Columns F1:NG14 hold the information required to be printed. The dates will only be for the current year, so I would also like a message box warning that any date picked outside of the current year will not work.

I hope that makes sense. 

Steve



解决方案

As an extra, i forgot to mention that the dates are generated from the date in B3. for instance:

Days are calculated:- Cell F2=B3, Cell G2=F2+1, Cell H3=G2+1 etc. The Date row is calculated in a similar way.


这篇关于打印区域选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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