Hi all!
I am dumping data from access to excel and want to bold the total row. It will not let me becuase I get a run-time error '91' - object or with block variable not set.
I have tried a bunch of different stuf and still the same error. Any ideas?
Here is my code:
xlw.Sheets("Results by Service Line").Select
lastRow = xlw.Sheets("Results by Service Line").Range("a1").SpecialCells(xlLastCell).row
lastRow = lastRow + 1
xlw.Sheets("Results by Service Line").Rows(lastRow).Select
With selection.font
.Bold = True
End With
I am dumping data from access to excel and want to bold the total row. It will not let me becuase I get a run-time error '91' - object or with block variable not set.
I have tried a bunch of different stuf and still the same error. Any ideas?
Here is my code:
xlw.Sheets("Results by Service Line").Select
lastRow = xlw.Sheets("Results by Service Line").Range("a1").SpecialCells(xlLastCell).row
lastRow = lastRow + 1
xlw.Sheets("Results by Service Line").Rows(lastRow).Select
With selection.font
.Bold = True
End With