ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Suppress 'Printing page' popup (https://www.excelbanter.com/excel-programming/337310-suppress-printing-page-popup.html)

David

Suppress 'Printing page' popup
 
I use the following to cycle through some sheet changes and print them:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address < "$A$1" Then Exit Sub
Dim MonArr, TueArr, WedArr, ThuArr, v, i As Long
MonArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Symptoms", "Creative Writing", "Picking
Up The Pieces")
TueArr = Array("LIFTT", "Wellness", "WRAP", "Sign Language", "Beginning
Computer", "Anger Management")
WedArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Medications", "WRAP", "Anger
Management")
ThuArr = Array("Picking Up The Pieces", "Wellness", "LIFTT", "Adult Basic
Education", "Beginning Computer", "Creative Writing")
Select Case Target.Value
Case "Monday"
v = MonArr
Case "Tuesday"
v = TueArr
Case "Wednesday"
v = WedArr
Case "Thursday"
v = ThuArr
Case "Friday"
Range("A1") = "Wellness"
GoTo Units
End Select
For i = LBound(v) To UBound(v)
ActiveSheet.Rows.Hidden = False
Range("A1") = (v(i))
Select Case v(i)
Case "Beginning Computer", "Intermediate Computer", "Adult Basic
Education"
Range("A14:A20").Rows.Hidden = True
Range("E11").Value = 4
Case "Creative Writing", "Sign Language", "Picking Up The Pieces"
Range("A15:A20").Rows.Hidden = True
Range("E11").Value = 5
Case Else
Range("E11").Value = 11
End Select
ActiveSheet.UsedRange
ActiveSheet.PrintOut
Next i
Units:
Sheets(2).Visible = True
With Sheets(2)
..Range("A1") = "Maintenance Signups": .PrintOut
..Range("A1") = "Food Service Signups": .PrintOut
End With
Sheets(2).Visible = False
Application.EnableEvents = True
End Sub

Is there a way to suppress the box that pops up showing that a page is
printing? I see it 8 separate times while this routine is executing and
it would be less distracting if I didn't.

--
David

STEVE BELL

Suppress 'Printing page' popup
 
David,

Not sure if this works for what you are seeing, but these work for most
things

Application.ScreenUpdating = False/True - hides screen flicker and changes
until code is complete.
Application.DisplayAlerts = False/True - prevents alerts from popping up.

--
steveB

Remove "AYN" from email to respond
"David" wrote in message
...
I use the following to cycle through some sheet changes and print them:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address < "$A$1" Then Exit Sub
Dim MonArr, TueArr, WedArr, ThuArr, v, i As Long
MonArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Symptoms", "Creative Writing", "Picking
Up The Pieces")
TueArr = Array("LIFTT", "Wellness", "WRAP", "Sign Language", "Beginning
Computer", "Anger Management")
WedArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Medications", "WRAP", "Anger
Management")
ThuArr = Array("Picking Up The Pieces", "Wellness", "LIFTT", "Adult Basic
Education", "Beginning Computer", "Creative Writing")
Select Case Target.Value
Case "Monday"
v = MonArr
Case "Tuesday"
v = TueArr
Case "Wednesday"
v = WedArr
Case "Thursday"
v = ThuArr
Case "Friday"
Range("A1") = "Wellness"
GoTo Units
End Select
For i = LBound(v) To UBound(v)
ActiveSheet.Rows.Hidden = False
Range("A1") = (v(i))
Select Case v(i)
Case "Beginning Computer", "Intermediate Computer", "Adult Basic
Education"
Range("A14:A20").Rows.Hidden = True
Range("E11").Value = 4
Case "Creative Writing", "Sign Language", "Picking Up The Pieces"
Range("A15:A20").Rows.Hidden = True
Range("E11").Value = 5
Case Else
Range("E11").Value = 11
End Select
ActiveSheet.UsedRange
ActiveSheet.PrintOut
Next i
Units:
Sheets(2).Visible = True
With Sheets(2)
.Range("A1") = "Maintenance Signups": .PrintOut
.Range("A1") = "Food Service Signups": .PrintOut
End With
Sheets(2).Visible = False
Application.EnableEvents = True
End Sub

Is there a way to suppress the box that pops up showing that a page is
printing? I see it 8 separate times while this routine is executing and
it would be less distracting if I didn't.

--
David




Dave Peterson

Suppress 'Printing page' popup
 
You can freeze all of the display:
http://groups.google.co.uk/groups?th...0A42%40msn.com



David wrote:

I use the following to cycle through some sheet changes and print them:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address < "$A$1" Then Exit Sub
Dim MonArr, TueArr, WedArr, ThuArr, v, i As Long
MonArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Symptoms", "Creative Writing", "Picking
Up The Pieces")
TueArr = Array("LIFTT", "Wellness", "WRAP", "Sign Language", "Beginning
Computer", "Anger Management")
WedArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Medications", "WRAP", "Anger
Management")
ThuArr = Array("Picking Up The Pieces", "Wellness", "LIFTT", "Adult Basic
Education", "Beginning Computer", "Creative Writing")
Select Case Target.Value
Case "Monday"
v = MonArr
Case "Tuesday"
v = TueArr
Case "Wednesday"
v = WedArr
Case "Thursday"
v = ThuArr
Case "Friday"
Range("A1") = "Wellness"
GoTo Units
End Select
For i = LBound(v) To UBound(v)
ActiveSheet.Rows.Hidden = False
Range("A1") = (v(i))
Select Case v(i)
Case "Beginning Computer", "Intermediate Computer", "Adult Basic
Education"
Range("A14:A20").Rows.Hidden = True
Range("E11").Value = 4
Case "Creative Writing", "Sign Language", "Picking Up The Pieces"
Range("A15:A20").Rows.Hidden = True
Range("E11").Value = 5
Case Else
Range("E11").Value = 11
End Select
ActiveSheet.UsedRange
ActiveSheet.PrintOut
Next i
Units:
Sheets(2).Visible = True
With Sheets(2)
.Range("A1") = "Maintenance Signups": .PrintOut
.Range("A1") = "Food Service Signups": .PrintOut
End With
Sheets(2).Visible = False
Application.EnableEvents = True
End Sub

Is there a way to suppress the box that pops up showing that a page is
printing? I see it 8 separate times while this routine is executing and
it would be less distracting if I didn't.

--
David


--

Dave Peterson

Dave Peterson

Suppress 'Printing page' popup
 
I don't think that these will stop those print popups. They're pretty
determined thingys.

STEVE BELL wrote:

David,

Not sure if this works for what you are seeing, but these work for most
things

Application.ScreenUpdating = False/True - hides screen flicker and changes
until code is complete.
Application.DisplayAlerts = False/True - prevents alerts from popping up.

--
steveB

Remove "AYN" from email to respond
"David" wrote in message
...
I use the following to cycle through some sheet changes and print them:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address < "$A$1" Then Exit Sub
Dim MonArr, TueArr, WedArr, ThuArr, v, i As Long
MonArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Symptoms", "Creative Writing", "Picking
Up The Pieces")
TueArr = Array("LIFTT", "Wellness", "WRAP", "Sign Language", "Beginning
Computer", "Anger Management")
WedArr = Array("Intermediate Computer", "Wellness", "Supported
Employment", "Understanding Your Medications", "WRAP", "Anger
Management")
ThuArr = Array("Picking Up The Pieces", "Wellness", "LIFTT", "Adult Basic
Education", "Beginning Computer", "Creative Writing")
Select Case Target.Value
Case "Monday"
v = MonArr
Case "Tuesday"
v = TueArr
Case "Wednesday"
v = WedArr
Case "Thursday"
v = ThuArr
Case "Friday"
Range("A1") = "Wellness"
GoTo Units
End Select
For i = LBound(v) To UBound(v)
ActiveSheet.Rows.Hidden = False
Range("A1") = (v(i))
Select Case v(i)
Case "Beginning Computer", "Intermediate Computer", "Adult Basic
Education"
Range("A14:A20").Rows.Hidden = True
Range("E11").Value = 4
Case "Creative Writing", "Sign Language", "Picking Up The Pieces"
Range("A15:A20").Rows.Hidden = True
Range("E11").Value = 5
Case Else
Range("E11").Value = 11
End Select
ActiveSheet.UsedRange
ActiveSheet.PrintOut
Next i
Units:
Sheets(2).Visible = True
With Sheets(2)
.Range("A1") = "Maintenance Signups": .PrintOut
.Range("A1") = "Food Service Signups": .PrintOut
End With
Sheets(2).Visible = False
Application.EnableEvents = True
End Sub

Is there a way to suppress the box that pops up showing that a page is
printing? I see it 8 separate times while this routine is executing and
it would be less distracting if I didn't.

--
David


--

Dave Peterson

David

Suppress 'Printing page' popup
 
Dave Peterson wrote

http://groups.google.co.uk/groups?th...0A42%40msn.com


Since that post starts with warning:
"You can turn off all of the windows screen updates--but it this code
stops, you'll be rebooting your pc:"

I think I'll live with what I've got unless someone else jumps in.

Thanks.

--
David


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com