2 edit spreadsheet logs, 3 delete spreadsheet logs, 4 schedule spreadsheet logs – Micromod Micro-PWC: 53PW6000 MicroPWC Configuration Guide User Manual

Page 265: 1 macro required for printing and scheduling, Microsoft excel spreadsheet logs

Advertising
background image

Micro-PWC CONFIGURATION GUIDE

Logs 245

6.4.2 Edit Spreadsheet Logs

If a spreadsheet log has already been configured, the configuration can be accessed for revision by using
the Edit button, located at the bottom of the Log Configuration window. First click the desired log name in
the list box to highlight it, then click Edit.

6.4.3 Delete Spreadsheet Logs

To delete a spreadsheet log, click the log name in the list box which appears in the Log Configuration win-
dow (

Figure 6-1

), then click Delete. A confirmation box will query:

Delete selected items?

Click Yes to delete the summary log, or click No to exit the operation without deleting the log.

6.4.4 Schedule Spreadsheet Logs

Spreadsheet logs can be scheduled to print on a regular basis, in the same manner as Event Logs. Click
the file name of the log to be scheduled to select it, then click Schedule at the bottom of the Log
Configuration
window (

Figure 6-1

). The Log Scheduler window (

Figure 6-3

) will appear.

Spreadsheet Log scheduling configuration is identical to that for Event Logs, described in

Schedule Event

Logs (Section 6.3.4)

.

6.4.4.1 Macro Required for Printing and Scheduling Microsoft Excel Spreadsheet Logs

To schedule and print a Microsoft Excel spreadsheet, you must first create a subroutine called
AUTO_OPEN, which checks to see if the Excel spreadsheet was opened for configuration or for printing,
as the result of use of the fpuprint function call. This subroutine must be called AUTO_OPEN. The
AUTO_OPEN subroutine will be executed each time a Microsoft Excel spreadsheet is opened.

If the spreadsheet was opened for printing, it obtains the printer device using the fpudevice function call
and initiates the printout. The subroutine then exits Excel.

If the spreadsheet was opened for configuration, the subroutine returns.

‘Auto_Open Macro

Sub Auto_Open()

Dim Flag As String

Application.DisplayAlerts = False

‘Flag = fpuprint()

If IsError (Flag) = False And Flag = “1” Then

Application.Calculation =x1Manual

‘Application.ActivePrinter = fpxactiveprinter()

Worksheets(“Sheet1”).Activate

ActiveSheet.UsedRange.Calculate

ActiveWindow.SelectedSheets.PrintOut Copies:=1

Application.Quit

End If

End Sub

Advertising