I am having trouble with the following line:
I wrote the code in the text editor and copied it to a module so I'm not totally sure what is wrong with it. My goal is to be able to insert a variable number of rows (B is number of rows to insert variable) starting at row 2 and shifting the rows down.
What might be the best way to insert B number of rows at row 2?
Thanks!
Code:
COM.Worksheets(g).Rows(2:B).Insert Shift:= xlDown
I wrote the code in the text editor and copied it to a module so I'm not totally sure what is wrong with it. My goal is to be able to insert a variable number of rows (B is number of rows to insert variable) starting at row 2 and shifting the rows down.
What might be the best way to insert B number of rows at row 2?
Thanks!