ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open, print and close workbook (https://www.excelbanter.com/excel-programming/316425-open-print-close-workbook.html)

despistado

Open, print and close workbook
 

It is possible to open, print and close a workbook passing the name o
the .xls like a parameter?

Thank you

--
despistad
-----------------------------------------------------------------------
despistado's Profile: http://www.excelforum.com/member.php...fo&userid=1629
View this thread: http://www.excelforum.com/showthread.php?threadid=27729


Nick Hodge

Open, print and close workbook
 
despistado

It depend what you mean by as a parameter.

You could set the workbook up with a Workbook_Open() event. This fires when
the workbook is opened. You could then have the workbook opened by a
command line or scheduled task. The workbook_Open() event code could look
like this

Private Sub Workbook_Open()
With Me
.PrintOut
.Close SaveChanges:=False
End With
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"despistado" wrote in message
...

It is possible to open, print and close a workbook passing the name of
the .xls like a parameter?

Thank you,


--
despistado
------------------------------------------------------------------------
despistado's Profile:
http://www.excelforum.com/member.php...o&userid=16297
View this thread: http://www.excelforum.com/showthread...hreadid=277299





All times are GMT +1. The time now is 04:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com