I am trying to write code to put a thick border around a range of cells. However, I am getting an error (Expected: =) with the below line of code.
Can anyone help please?
Range("A2:G5").BorderAround(Weight:=xlThick, ColorIndex:=5)
I am trying to write code to put a thick border around a range of cells. However, I am getting an error (Expected: =) with the below line of code.
Can anyone help please?
Range("A2:G5").BorderAround(Weight:=xlThick, ColorIndex:=5)
give this a kick
Range("A2:G5").BorderAround , xlThick, ColorIndex:=5
If you wanted to keep it as a FUNCTION then you should do this
Whatever = Range("A2:G5").BorderAround(Weight:=xlThick, ColorIndex:=5)