Excel, Marco,help

2009-05-01 7:05 pm
Please teach me how to write a marco as following :

Add a "print" button on the right hand corner, then press the button to print all sheet in same formate and double side.


Thanks very much !!!!!!!!

回答 (1)

2009-05-09 6:32 pm
✔ 最佳答案
You should open the visual basic tools bar :

檢視(view) - 工具列(tools) - Visual Basic

then kick the Visual Basic編輯器 (Visual Basic edit) in this tools bar

插入(Insert) - 模組(Macro)
Type the macro in Module1:

Sub Macro1()
x = ActiveSheet.PageSetup.Zoom
ActiveSheet.PageSetup.Zoom = x * 2
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.PageSetup.Zoom = x
End Sub

Back to your EXCEL worksheet screem

Kick "BUTTON" in the visual basic tools bar to make button

Choose "Macro1"

You can press this new button to print your worksheet in double side.


收錄日期: 2021-04-13 16:35:54
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20090501000051KK00467

檢視 Wayback Machine 備份