Я кодирую макрос VBA, но я получаю вышеуказанную ошибку.Я вижу, что есть много других с этой общей ошибкой, однако, решение, кажется, отличается для каждого человекаКакова причина этой ошибки в моем коде макроса ниже?
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 1/15/2010 by '
Cells.Replace What:="NULL", Replacement:="", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Cells.ReadingOrder = xlLTR
Cells.VerticalAlignment = xlTop
Rows("1:1").Font.Bold = True
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.LeftHeader = "Abbott Molecular Confidential"
'.CenterHeader = "Actions (Correction, Corrective and Preventive) Initiated" & Chr(10) & "From 9/1/2009 to 02/21/2011"
'.CenterHeader = "HCV Actions (Correction, Corrective and Preventive) Initiated" & Chr(10) & "From 9/1/2009 to 02/21/2011"
'.CenterHeader = "Investigations Created" & Chr(10) & "From 9/1/2009 to 02/21/2011"
'.CenterHeader = "HCV Investigations Created" & Chr(10) & "From 9/1/2009 to 02/21/2011"
'.CenterHeader = "ALK Complaints with Report Date" & Chr(10) & "From 1/1/2008 to 12/31/2010"
'.CenterHeader = "Process Exceptions" & Chr(10) & "From 05/16/2010 to 05/16/2011"
'.CenterHeader = "ALK Complaints By Lot Number"
'.CenterHeader = "All Process Nonconformances" & Chr(10) & "From 05/01/2009 to 04/30/2011"
'.CenterHeader = "2G28-90_Multilevel BOM, 8L070 and 1L31 Exceptions Initiated " & Chr(10) & "From 3/18/2011 to 4/4/2011"
'.CenterHeader = "Process Exceptions Initiated " & Chr(10) & "From 10/1/2010 to 04/26/2011"
'.CenterHeader = "Containments " & Chr(10) & "From 9/1/2009 to 02/21/2011"
.CenterHeader = "Complaint Search for RT mS9 US" & Chr(10) & "From 02/09/2009 to 01/05/2011"
.RightHeader = "Printed on &D &T"
.RightFooter = "Page &P of &N"
.LeftFooter = "Data pulled on 05/18/2011"
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
End With
End Sub