I figured out what Nick was suggesting, and the following is the error number & description that I\'m getting:
\'-2147417848 (80010108)\' Automation
Make sure your sheet is not protected with cells locked while doing insert. This could be one of the reason why the code will fail. This code was working for me on one folder, but when I copied the excel macro file to another folder I started getting this error. Since it is only for formatting, I avoided using the below codes altogether and did formatting the usual way and not copying from above rows.
Note that in first code, entire row gets selected and if you have protected cells, it could lead to failure.
'Rows(r + 3 & ":" & r + 3).Select
'Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove