View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default What is the CopyOrigin parameter for in the Excel VBA insert metho

Philip,

I found some Google Groups threads with the same question. The second one
hit paydirt. Here is the answer from somebody known only as "djh63."

"There is one use for CopyOrigin ... telling the insert whether to use the
formatting above/below/left/right of the inserted text. The only
value I've seen is xlFormatFromRightOrBelow ... Left/Above is the default.
In fact, that's how I found this thread is searching for a
list of possible values ... not many mentions of this ... had to resort to
recording a macro to figure out the right value for copying from
below ... ;) "

I tried it with this bit of code, and djh63 is right:

Rows("2:2").Insert CopyOrigin:=xlFormatFromRightOrBelow

hth,

Doug


"Philip_plf" wrote in message
...
Any suggestions?

--
Philip