Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default do until end of list

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default do until end of list

It is always worth checking on the faulty machine if there are any items in
ToolsReferences marked as MISSING. If so, uncheck them.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"semiopen" wrote in message
oups.com...

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing List A to List B and add what's missing from List B Gilbert Excel Discussion (Misc queries) 1 July 20th 09 08:41 PM
create new list from list A, but with exclusions from a list B Harold Good Excel Worksheet Functions 3 April 11th 08 11:23 PM
validation list--list depends on the selection of first list Michael New Users to Excel 2 April 27th 06 10:23 PM
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 Ed Excel Worksheet Functions 5 September 12th 05 09:48 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"