Results 1 to 3 of 3

Find and replace Loop Error

Threaded View

fengfeng Find and replace Loop Error 06-24-2009, 02:57 PM
shg Re: Find and replace Loop... 06-24-2009, 03:49 PM
fengfeng Re: Find and replace Loop... 06-24-2009, 03:57 PM
  1. #1
    Registered User
    Join Date
    06-03-2008
    Posts
    32

    Find and replace Loop Error

    I have the following code in my macro and when I run the macro it always freezes at this code, I think it loops it.. What's wrong with it?
    For Each c In ActiveSheet.UsedRange
    c = Replace(c, "userfield", "LT REM")
    Next
    End If
    I also have this code which finds the last column then it inserts 2 columns named donors, and cost. The column heading starts at row 5. But it dont work.
    Lcol = Range("IV1").End(xlToLeft).Column + 1
    Cells(5, Lcol) = "Donor Net Rev"
    Lcol = Range("IV1").End(xlToLeft).Column + 1
    Cells(5, Lcol) = "Cost/Donor List"
    Last edited by fengfeng; 06-24-2009 at 03:54 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1