Using variables for row index

N

NYIT

Hello,

Working with Visual Basic I am trying to insert a row at a point in an
excel spreadsheet. This point will constantly change depending on other
information. Now I know the code to do this is

Rows("42:42").Select
Selection.Insert Shift:=xlDown

and I have a variable k dimensioned as an integer and its value set to
the number of rows down that I want the new row to be inserted in.
Everyway that I have tried to place this integer in it has not worked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top