I am trying to set a range of cells using a variable and am getting a runtime error. I may be a different issue, but I believe I may not be using the variable correctly.
All I am trying to do is reformat a range of cells.
Code:
Option Explicit
Public Sub Reformat()
Dim LastRow As Long
Dim wb As Workbook
Dim ws As Worksheet
Dim r As Range
Dim c As Range
Set wb = ThisWorkbook
Set ws = wb.Sheets("Bid List")
LastRow = Cells(Rows.Count, "A").End(xlUp).Offset(1).Row
Set r = ws.Range("A12:D" & LastRow)
If LastRow = 11 Then
Exit Sub
Else
With ws.Range(r)
.Font.Size = 12
.Font.Color = vbBlack
.HorizontalAlignment = xlCenter
.BorderAround = xlContinuous
End With
End If
End Sub