I think the problem is :
you are trying to activate file1.XLS while your file name is workbook1.XLS

==========>    Windows("file1.XLS").Activate
>              ActiveWindow.WindowState = xlNormal
>              Sheets("sheet1").Select
>              Range("A70:P143").Select
>              Application.ActivePrinter = "..........."
>              Selection.PrintOut Copies:=1
>
=========>     Windows("workbook1.xls").Close
>              End Sub



>From: "hafedh ghodhbani" <[EMAIL PROTECTED]>
>Reply-To: "Foxboro DCS Mail List" <[EMAIL PROTECTED]>
>To: "'Foxboro DCS Mail List'" <[EMAIL PROTECTED]>
>Subject: Excel macros
>Date: Fri, 21 Sep 2001 22:57:17 +0200
>
>team,
>Is someone familar with Excel(5) macros? here is my problem.
>I use some Excel macros to print automatically production reports on a pc. 
>The printing macros are launched (activated) by a small package named 
>Scheduler in the defined times.
>suddenly, the package could not launch the macros, displaying a warning: 
>invalid file specified.
>I spent lot of time without fixing this problem.
>have so experienced this! please advive
>
>How do you print automatically your reports
>Could you send macros example?
>below is an example of a macro included in workbook1.xls
>
>Sub Auto_Open()
>
>     Windows("file1.XLS").Activate
>     ActiveWindow.WindowState = xlNormal
>     Sheets("sheet1").Select
>     Range("A70:P143").Select
>     Application.ActivePrinter = "..........."
>     Selection.PrintOut Copies:=1
>
>     Windows("workbook1.xls").Close
>End Sub
>
>
>
>Regards
>Hafedh ghodhbani
>control and instr engineer
>british gas international
>hannibal gas plant Tunisia
>ph 00 216 4 259 250
>fx  00 216 4 259 449
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to 
[EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

Reply via email to