Hi all,
Following my recent post, I have the following code (inserting a column using a user input) that works:
(Code)
colLetter = InputBox("Please enter replication factor column:", "Factor column")
Columns(colLetter).Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
(/Code)
And based on the input, I'm trying to automate the insertion of other columns by an offset of 2, but I am missing the correct syntax:
(Code)
Columns(colLetter.Offset(0, 2)).Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
(/Code)
I would like to know if there is a proper way to write this line?
Thanks in advance,
Nicolas
Following my recent post, I have the following code (inserting a column using a user input) that works:
(Code)
colLetter = InputBox("Please enter replication factor column:", "Factor column")
Columns(colLetter).Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
(/Code)
And based on the input, I'm trying to automate the insertion of other columns by an offset of 2, but I am missing the correct syntax:
(Code)
Columns(colLetter.Offset(0, 2)).Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
(/Code)
I would like to know if there is a proper way to write this line?
Thanks in advance,
Nicolas