D
despistado
I need to open a workbook, print it and close, for example from a .ba
file, but that the user can open the workbook without problem.
I write this:
Private Sub WorkBook_Open()
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.Quit
End Sub
But when I execute excel.exe c:\myworkbook the excel ask my if I wan
to activate/desactivate macros.
Somebody same me that the best option is to create a new workbook an
write
Private Sub Auto_Open()
Workbooks.Open Filename:="c:\example.xls"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.Quit
End Sub
It's possible to do something like this but "c:\example.xls" will be a
parameter
file, but that the user can open the workbook without problem.
I write this:
Private Sub WorkBook_Open()
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.Quit
End Sub
But when I execute excel.exe c:\myworkbook the excel ask my if I wan
to activate/desactivate macros.
Somebody same me that the best option is to create a new workbook an
write
Private Sub Auto_Open()
Workbooks.Open Filename:="c:\example.xls"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.Quit
End Sub
It's possible to do something like this but "c:\example.xls" will be a
parameter