ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What is the CopyOrigin parameter for in the Excel VBA insert metho (https://www.excelbanter.com/excel-programming/359560-what-copyorigin-parameter-excel-vba-insert-metho.html)

Philip_plf

What is the CopyOrigin parameter for in the Excel VBA insert metho
 
Any suggestions?

--
Philip

Doug Glancy

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





All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com