M
mickey
My macro keeps crashing. Here is the error message and applicabe code:
Subscript out of range in
Project1.Form1.FormatSpread at line 6960
6960 ActiveWorkbook.Worksheets("BaseBid").Activate
Range("C35").Select
ActiveSheet.Unprotect "Rj6823Lkt2"
ActiveCell.FormulaR1C1 = "=Labor!R[-34]C[3]"
ActiveSheet.Protect Password:="Rj6823Lkt2"
ActiveWorkbook.Worksheets("JobCost").Activate
Range("D88").Select
ActiveSheet.Unprotect "Rj6823Lkt2"
ActiveCell.FormulaR1C1 =
"=(SUMIF(Labor!R3C2:R499C2,RC[-3],Labor!R3C6:R499C6))*.75+SUMIF(Worksheet!R4C5:R173C5,RC[-3],Worksheet!R4C1:R173C1)+SUMIF(BaseBid!R34C2:R77C2,RC[-3],BaseBid!R34C7:R77C7)"
Selection.AutoFill Destination:=Range("D88242"),
Type:=xlFillDefault
Range("A9").Select
Range("A7").Select
ActiveSheet.Protect Password:="Rj6823Lkt2"
Any help?
Subscript out of range in
Project1.Form1.FormatSpread at line 6960
6960 ActiveWorkbook.Worksheets("BaseBid").Activate
Range("C35").Select
ActiveSheet.Unprotect "Rj6823Lkt2"
ActiveCell.FormulaR1C1 = "=Labor!R[-34]C[3]"
ActiveSheet.Protect Password:="Rj6823Lkt2"
ActiveWorkbook.Worksheets("JobCost").Activate
Range("D88").Select
ActiveSheet.Unprotect "Rj6823Lkt2"
ActiveCell.FormulaR1C1 =
"=(SUMIF(Labor!R3C2:R499C2,RC[-3],Labor!R3C6:R499C6))*.75+SUMIF(Worksheet!R4C5:R173C5,RC[-3],Worksheet!R4C1:R173C1)+SUMIF(BaseBid!R34C2:R77C2,RC[-3],BaseBid!R34C7:R77C7)"
Selection.AutoFill Destination:=Range("D88242"),
Type:=xlFillDefault
Range("A9").Select
Range("A7").Select
ActiveSheet.Protect Password:="Rj6823Lkt2"
Any help?