Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Variable refrence

  Asked By: Cristina    Date: Sep 23    Category: MS Office    Views: 690
  

I want to run below mwntioned code in macro but IO am getttin an erro
in line Rows("j:k").Select, can any one suggest me how to select a row
using variables, its very urgent.

For j = 2 To 2000 Step 2
k = j + 2
Rows("j:k").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Next j

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Kawakib Mansour     Answered On: Sep 23

Rows(j & ":" & k).Select

I also suspect the first line  might want to be on the lines of:
For j = 2000 To 2 Step -2

 
Didn't find what you were looking for? Find more on Variable refrence Or get search suggestion and latest updates.




Tagged: