Good morning,
I am running the following macro. it works perfect until the last line (in bold). It is generating an error.
What am I missing?
==============================================================
With ActiveSheet
For xxx = 12 To (InvoiceStartingRow + 1)
'.Range(.Cells(xxx, 2), .Cells(xxx, 6)).Borders.LineStyle = xlContinuous
.Range(.Cells(xxx, 2), .Cells(xxx, 7)).Borders(xlEdgeLeft).LineStyle = xlContinuous
.Range(.Cells(xxx, 2), .Cells(xxx, 7)).Borders(xlEdgeRight).LineStyle = xlContinuous
.Range(.Cells(xxx, 2), .Cells(xxx, 7)).Borders(xlInsideVertical).LineStyle = xlContinuous
Next xxx
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 2, 6)).Borders(xlEdgeBottom).LineStyle = xlContinuous
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 4, 6)).Borders.LineStyle = xlContinuous
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 4, 6)).Borders(xlInsideVertical).LineStyle = xlNone
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 4, 6)).Borders(xlInsideHorizontal).LineStyle = xlNone
.Range(.Cells(InvoiceStartingRow + 2, 5)) = "Debit:"
End With
==============================================================
does this have t do with the cell format not accepting text?
I am running the following macro. it works perfect until the last line (in bold). It is generating an error.
What am I missing?
==============================================================
With ActiveSheet
For xxx = 12 To (InvoiceStartingRow + 1)
'.Range(.Cells(xxx, 2), .Cells(xxx, 6)).Borders.LineStyle = xlContinuous
.Range(.Cells(xxx, 2), .Cells(xxx, 7)).Borders(xlEdgeLeft).LineStyle = xlContinuous
.Range(.Cells(xxx, 2), .Cells(xxx, 7)).Borders(xlEdgeRight).LineStyle = xlContinuous
.Range(.Cells(xxx, 2), .Cells(xxx, 7)).Borders(xlInsideVertical).LineStyle = xlContinuous
Next xxx
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 2, 6)).Borders(xlEdgeBottom).LineStyle = xlContinuous
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 4, 6)).Borders.LineStyle = xlContinuous
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 4, 6)).Borders(xlInsideVertical).LineStyle = xlNone
.Range(.Cells(InvoiceStartingRow + 2, 2), .Cells(InvoiceStartingRow + 4, 6)).Borders(xlInsideHorizontal).LineStyle = xlNone
.Range(.Cells(InvoiceStartingRow + 2, 5)) = "Debit:"
End With
==============================================================
does this have t do with the cell format not accepting text?