Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[COLOR=blue]XLAPP.ActiveSheet.PrintOut Copies:=1, Collate:=True [COLOR=green]' submit print job as per sal21[/color]
Set PrinterSet = GetObject("winmgmts:").InstancesOf("Win32_Printer")
If (PrinterSet.Count = 0) Then Debug.Print "No Printers Installed!"
For Each oPrinter In PrinterSet
If oPrinter.Name = Left(XLAPP.ActivePrinter, InStr(XLAPP.ActivePrinter, " on") - 1) Then
If oPrinter.PrinterStatus = 2 Then Debug.Print oPrinter.Name & Chr(13) & "Status: Error, " & oPrinter.ErrorDescription
If oPrinter.PrinterStatus = 3 Then Debug.Print oPrinter.Name & Chr(13) & "Status: Idle"
If oPrinter.PrinterStatus = 4 Then Debug.Print oPrinter.Name & Chr(13) & "Status: Printing"
End If
Next[/color]
Dim XLWB As Object, WS As Object, XLAPP As Object
Set XLAPP = CreateObject("Excel.Application")
Set XLWB = XLAPP.Workbooks.Open(FileName:=STRWB, Editable:=True)
Set WS = XLWB.Worksheets("REPORT")
WS.Range("B2:AZ51").ClearContents
CONTA = 0
With WS
.Application.ScreenUpdating = False
For K = 0 To UBound(strDBRows_ESTRAI, 2)
.Cells(strDBRows_ESTRAI(3, K) + 1, strDBRows_ESTRAI(4, K) + 1) = "X"
.Cells(strDBRows_ESTRAI(3, K) + 1, 52) = .Cells(strDBRows_ESTRAI(3, K) + 1, 52) + 1
CONTA = CONTA + 1
DoEvents
Next K
.Application.ScreenUpdating = True
'IMPOSTAZIONI PAGINA DI STAMPA
DXSX = DXSX & "X"
.PageSetup.CenterHeader = "REPORT OMBRELLONI DEL: " & Format(GIORNO, "DD/MM/YYYY") & " - (ZONA: " & DXSX & ")"
.PageSetup.LeftFooter = "REPORT STAMPATO IL: " & Format(Date, "DD/MM/YYYY")
.PageSetup.RightFooter = "OMBRELLONI PRENOTATI NR: " & CONTA
.PageSetup.PaperSize = vbPRPSA4
'IMPOSTAZIONI PAGINA DI STAMPA
XLAPP.Activesheet.PrintOut Copies:=1, Collate:=True
End With