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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do Until a certain column

Status
Not open for further replies.

uscguy22

Technical User
Joined
Dec 8, 2004
Messages
2
Location
US
Hi Everyone,

I have a pretty simple question (i belive). I am writing a procedure and want it to repeat until a certain column.

So i have:

Do until activecell.column = 100
Blah blah blah
Activecell.offset(0,1).select
Loop

The "100" isn't being recogonized and the macro keeps running until it runs into the last column and gives me an error. Can anyone help me on this?

Thanks!
 
Perhaps this ?
Activecell.offset(0,1).Activate

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
What you have written works fine for me.
What are you doing during the 'blah blah blah'?
Try this:
Code:
Sub test()
Do Until ActiveCell.Column = 10
ActiveCell = "=column()"
ActiveCell.Offset(0, 1).Select
Loop
Does that work?

[tt]_____
[blue]-John[/blue]
[/tt][red]"I'm against picketing, but I don't know how to show it."[/red]
-Mitch Hedberg

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top