Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 14th, 2005, 04:04 PM
Authorized User
Join Date: Oct 2005
Location: Summerville, SC, USA.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default Loop Problems

Can someone tell me whats wrong with this:

Sub SwapDate()

Dim ocell as range

For each oCell in Selection
   If Isempty(activecell) Then
      oCell.FormulaR1C1 = "=RC[24]"
   End If

End Sub
When I run the code it only does one cell then the activecell jumps up 4 rows.

Reply With Quote
  #2 (permalink)  
Old November 15th, 2005, 02:37 AM
Friend of Wrox
Join Date: Oct 2003
Location: , , Finland.
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts


Change this row
If Isempty(activecell) Then
If Isempty(oCell) Then


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help with loop... cbtidball Access VBA 4 February 22nd, 2006 09:55 AM
For loop problems cube Beginning VB 6 2 November 29th, 2004 04:01 PM
Do While Loop Problems gmoney060 Classic ASP Databases 2 August 8th, 2004 08:52 PM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM

All times are GMT -4. The time now is 12:50 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.