Hacktastic
Technical User
Hi team,
I have vba sub that gets called from a change in a value of a cell:
ie:
Where nonupdating is :
and BU is
the screen updating portion for BU is not working and it giving me a headache switching between sheets. the Screen Updating sub i created is not working. any advice would be greatly appreciated.
I have vba sub that gets called from a change in a value of a cell:
ie:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$C$5" Then
nonupdating
BU
...
end if
Where nonupdating is :
Code:
Option Explicit
Public Sub nonupdating()
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
End Sub
and BU is
Code:
Option Explicit
Sub BU()
' BU Macro
' Macro recorded 10/19/2010 by Charles Grayson
'
nonupdating
Unprotect_Sheet
Range("D1").Select
Sheets("Consolidated Data").Select
With Application
.Calculation = xlManual
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
Range("J2").Select
Selection.AutoFilter Field:=9, Criteria1:="YES"
Columns("G:G").Select
Selection.Copy
Sheets("User Interface").Select
Columns("N:N").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWorkbook.PrecisionAsDisplayed = False
Sheets("Consolidated Data").Select
Application.CutCopyMode = False
ActiveSheet.ShowAllData
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
Sheets("User Interface").Select
Range("C7:C12").Select
Range("C12").Activate
Selection.ClearContents
Range("B2").Select
End With
nonupdating
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=4, Criteria1:="<>"
Selection.AutoFilter Field:=1, Criteria1:="=1", Operator:=xlAnd
Columns("H:L").Select
Selection.Copy
nonupdating
Sheets("User Interface").Select
Range("Z1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1
Selection.AutoFilter Field:=1, Criteria1:="=2", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("AE1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=3", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("AJ1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=4", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("AO1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=5", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("AT1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=6", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("AY1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=7", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("BD1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=8", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("BI1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=9", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("BN1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=10", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("BS1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=11", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("BX1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=12", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("CC1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=13", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("CH1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=14", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("CM1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Selection.AutoFilter Field:=1, Criteria1:="=15", Operator:=xlAnd
Columns("H:L").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("User Interface").Select
Range("CR1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Consol Data 2").Select
Application.CutCopyMode = False
ActiveSheet.ShowAllData
Sheets("User Interface").Select
Range("B2").Select
Protect_Sheet
End Sub
the screen updating portion for BU is not working and it giving me a headache switching between sheets. the Screen Updating sub i created is not working. any advice would be greatly appreciated.