Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default problem with Application.ScreenUpdating

It worked fine for me. The only thing I saw was the printpreview screen and
a prompt about deleting sheets.

If you want to suppress the prompt about deleting sheets

Application.DisplayAlerts = False
NewSheet.Delete
Application.DisplayAlerts = True

--
Regards,
Tom Ogilvy

"Betty" wrote in message
...
Application.ScreenUpdating = False is not working.

Thank you for your help.

Here is the code. Sorry it's a little long and messy.

Sub Print_Stuff()
' doesn't seem to work...
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

Sheets("Print_Template").Visible = True
Application.Goto Reference:="template"
Selection.Copy
Set NewSheet = Worksheets.Add
NewSheet.Name = "Print_All"
' For each entry in the list add a section to Print_All
For Each c In Worksheets("OD_list").Range("loops").Cells
If Abs(c.Value) 0 Then
i = c.Value
Worksheets("Print_All").Activate
If i = 1 Then
linkCell = "A1"
Else
linkCell = "A" & ((i - 1) * 87)
End If
Range(linkCell).Select
ActiveSheet.Paste
ActiveCell.FormulaR1C1 = i
Else
If c.Value = "" Then
Exit For
End If
End If
Next

' In each section added, hide two rows of lookup values
For Each c In Worksheets("OD_list").Range("loops").Cells
If Abs(c.Value) 0 Then
i = c.Value
If i = 1 Then
cRow = 5
linkCell = "A5"
Else
cRow = (((i - 1) * 87) + 4)
linkCell = "A" & (((i - 1) * 87) + 4)
End If
Range(linkCell).Select
Selection.EntireRow.Hidden = True
linkCell = "A" & (cRow + 1)
Range(linkCell).Select
Selection.EntireRow.Hidden = True
' Set page break
If cRow 87 Then
Worksheets("Print_All").Rows(cRow -
4).PageBreak = xlPageBreakManual
End If
Else
If c.Value = "" Then
Exit For
End If
End If
Next
' Format for printing
cRow = cRow + 81
linkCell = "S" & cRow
Application.Calculation = xlCalculationAutomatic
Worksheets("Print_All").Activate
ActiveSheet.PageSetup.PrintArea = "$A$1:" & linkCell
ActiveSheet.PageSetup.Zoom = 50
Worksheets("Print_All").Columns("T").PageBreak =
xlPageBreakManual
Worksheets("Print_All").DisplayPageBreaks = True
Worksheets("Print_All").PrintPreview
'ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True

NewSheet.Delete
Sheets("Print_Template").Visible = False
Application.ScreenUpdating = True
End Sub


-----Original Message-----
For most people it works. Your experience is not

typical. Perhaps if you
posted your code someone might be able to spot the cause.

--
Regards,
Tom Ogilvy

"Betty" wrote in

message
...
Hi,

Is the purpose of Application.ScreenUpdating = False in

an
Excel macro supposed to "hide" changes to the workbook
from the users? The worksheet that is being created by

my
macro displays and runs the commands so users can see

even
though I have Application.ScreenUpdating = False.

I don't want anything to display.

I am using Windows XP and MS Excel 2003. I have

installed
MS SP3 also.

Why doesn't the Application.ScreenUpdating = False work?


Thank you,



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does Selection.PasteSpecial toggle Application.ScreenUpdating OssieMac Excel Worksheet Functions 2 August 4th 09 12:05 AM
How to set Application.ScreenUpdating = False for Gen use David_Williams_PG () Excel Discussion (Misc queries) 1 August 15th 06 12:06 PM
Application.ScreenUpdating function question Fleone Excel Worksheet Functions 2 May 12th 05 01:36 AM
application.screenupdating problems and IE browser window belinda Excel Programming 0 September 17th 03 12:00 PM
Application.ScreenUpdating = False Pieter Kuyck Excel Programming 2 July 15th 03 06:28 PM


All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"