Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looping round an Excel range object

Status
Not open for further replies.

Shake412

Programmer
Apr 17, 2002
55
0
0
GB
I'm currently migrating VB6 app to .net which uses a lot of excel automation. the vb6 code employs a number of ranges and loops using a second range object as follows

For Each rngCell in rngFocus
< Do Stuff>
Next

This doesn't appear to work in .net, producing an Exception "Member Not Found"

Is there an easy way to convert all the loops. I know I can use "For i = 1 To rngFocus.Areas.Count" but this will be a pain to convert.

Thanks
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top