CopyOrigin on Insert in Excel VBA
It takes either of one parameter as given below.
Const xlFormatFromLeftOrAbove = 0
Member of Excel.XlInsertFormatOrigin
and...
Const xlFormatFromRightOrBelow = 1
Member of Excel.XlInsertFormatOrigin
Adding to Lakshmanaraj's comments - it picks up the formatting option depending on where you are inserting cells & what formatting you wish to pick.
Lets say you have:
first row which has bold text,
second row has things in italic.
You select the 2nd row & execute the following expression:
Selection.Insert CopyOrigin:=xlFormatFromLeftOrAbove
The new row gets inserted between 1st and 2nd row & it picks formatting rules from the "row above" or "cells to the left of the cell".
In this case, the newly inserted cells will have text as bold without you setting it explicitly.