Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why does Selection.PasteSpecial toggle Application.ScreenUpdating | Excel Worksheet Functions | |||
How to set Application.ScreenUpdating = False for Gen use | Excel Discussion (Misc queries) | |||
Application.ScreenUpdating function question | Excel Worksheet Functions | |||
application.screenupdating problems and IE browser window | Excel Programming | |||
Application.ScreenUpdating = False | Excel Programming |