J
JOUIOUI
I'm using this code to add 2 columns to the left to only a few of my sheets
in my workbook but it is not working. I'm calling only the sheets I want to
add the code to but I'm getting the error of "Wrong Number of Arguements or
invalid property assignment". What am I doing wrong here. Thanks
Sub AddColumnsToLeft()
' Insert 2 columns to the far left with gridlines and column headings to
specific sheets
Sheets("NEW CONFIRM REPORT", "GESV CARD NO MATCHES", "GESA CHECK NO
MATCHES", _
"GESA CARD NO MATCHES").Select
Columns("A:B").Select
Selection.Insert Shift:=xlToRight
Columns("A:A").ColumnWidth = 9.5
Columns("B:B").ColumnWidth = 25
Columns("D").ColumnWidth = 10.71
Columns("C:C").ColumnWidth = 10
Range("A1").Select
ActiveCell.FormulaR1C1 = "TRAN CD"
Range("B1").Select
ActiveCell.FormulaR1C1 = "COMMENTS/NOTES"
ActiveSheet.PageSetUp.PrintArea = "$A:$J"
Columns("A:J").Select
Columns("A:J").Borders.LineStyle = xlContinuous
Columns("B:B").Select
With Selection
.WrapText = True
End With
End Sub
in my workbook but it is not working. I'm calling only the sheets I want to
add the code to but I'm getting the error of "Wrong Number of Arguements or
invalid property assignment". What am I doing wrong here. Thanks
Sub AddColumnsToLeft()
' Insert 2 columns to the far left with gridlines and column headings to
specific sheets
Sheets("NEW CONFIRM REPORT", "GESV CARD NO MATCHES", "GESA CHECK NO
MATCHES", _
"GESA CARD NO MATCHES").Select
Columns("A:B").Select
Selection.Insert Shift:=xlToRight
Columns("A:A").ColumnWidth = 9.5
Columns("B:B").ColumnWidth = 25
Columns("D").ColumnWidth = 10.71
Columns("C:C").ColumnWidth = 10
Range("A1").Select
ActiveCell.FormulaR1C1 = "TRAN CD"
Range("B1").Select
ActiveCell.FormulaR1C1 = "COMMENTS/NOTES"
ActiveSheet.PageSetUp.PrintArea = "$A:$J"
Columns("A:J").Select
Columns("A:J").Borders.LineStyle = xlContinuous
Columns("B:B").Select
With Selection
.WrapText = True
End With
End Sub