>I am trying to use Excel 7.0 to generate a chart and then print it to
>a file using a VB module. I am trying to do this without any user
>interaction but when I try to use the 'object.Printout' method to print
>to a file, I noticed that it does not take a filename as parameter but
>expects a user to input the file name. I tried using the binder concept
>and tried the following
>I got a run time error saying that the arguments are invalid.
>Can someone tell me where I am going wrong?
Here is the help text for PrintOut. Note that there are no "what:" or
"filename:" parameters. Let me know if you have questions. Good luck...
object.PrintOut(from, to, copies, preview)
The PrintOut method has the following object qualifier and named
Required. The object to print.
Optional. The number of the page with which to start printing. If omitted,
printing starts at the beginning.
Optional. The number of the last page to print. If omitted, printing goes
to the last page.
Optional. The number of copies to print. If omitted, one copy is printed.
Optional. If True, Microsoft Excel invokes print preview before printing
the object. If False (or omitted) the object is printed immediately.
"Pages" in the descriptions of from and to refers to printed pages -- not
overall pages in the sheet or workbook.