View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
semiopen semiopen is offline
external usenet poster
 
Posts: 25
Default do until end of list


Arne Hegefors wrote:
Hi! I have a long list in a spreadsheet. In my macro I want to loop through
that list and do series of operations as long as I have not reached the end
of my list. I am having some trouble with my code. The thing is that it
depends on which computer I am running the code on. On my computer it works
fine but the other computer gives error: Object required.

The simple loop I am trying to make is:

Set nameCell = Range("b9")
Do Until IsEmpty(nameCell.Offset(i, 0))
i = i + 1
Loop

As far as I know I have the same Excel version. Please help me with this!
Thank you very much!


Are you sure that there isn't something in the body of the loop which
is throwing the error? What is the actual line causing problems?

Also - earlier today in this group the topic of code working on one
machine but not another was raised. In that case, the underlying
problem was found to involve project references. Does your code invoke
an object from an external reference?

-semiopen