Inserting a Row with a Variable Row Number

I

Izran

Simple problem I believe, but I have a interger variable expression
(iEnd - 2) that identifies the row number I want to select to insert a
row in Excel. For the life of me, I cant seem to figure out how to do
it. Any help will be appreciated.

Regards,
Michael P Manzi
 
T

TC

I don't have Excel here to check, but I imagine that it would be
somehing like:

rows(iEnd-2).Insert
or rows(iEnd-2).InsertRow
or rows(iEnd-2).EntireRow.Insert

or somesuch.

You may need to add or subtract 1 to the numeric expression to get the
new row just where you want it.

If nothing else works, just turn on the macro recorder, click some row,
hit Insert Row (or whatever the relevant menu option is), turn the
recorder off, & see what code was generated.

HTH,
TC
 

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