Getting the row from a range

  • Thread starter Thread starter skulkrinbait
  • Start date Start date
S

skulkrinbait

I have a loop thus:

----------

For Each sMainScreen In Range("C4:CA21")


Next sMainScreen

---------

I need to get the row number for each pass of the iteration, how can I
do that please?

Thanks for any help.
 
I have a loop thus:
----------

For Each sMainScreen In Range("C4:CA21")


Next sMainScreen

Inside the loop, sMainScreen.Row will give you that. If you haven't done so,
I would recommend including this declaration statement in your procedure....

Dim sMainScreen As Range

Then VBA's intellisense would provide you with the available properties (as
memory joggers) to select from.

Rick
 

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

Back
Top