Results 1 to 3 of 3

Trouble matching statements in VBA

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-14-2009
    Location
    Midwest
    MS-Off Ver
    Excel 2003/2007
    Posts
    103

    Trouble matching statements in VBA

    Hey all,
    I am working on a macro that I can't seem to get to work, seems like something very basic, but I keep getting errors that my End With doesn't have a With, but it does. I read that it can happen because of an unended If statement within the With, but my if statement is matched. Here is that section of code:
    With ThisWorkbook.Worksheets("Full Contact List")
    Do Until IsEmpty(Worksheets("Full Contact List").Range("A" & x))
        If Worksheets("Full Contact List").Range("A" & x).Value = Contact Then
                Worksheets("Contact Info Sheet").Range("B" & 2) = Worksheets("Full Contact Sheet").Range("B" & x).Value
                x = x + 1
        Else
                x = x + 1
        End If
    End With
    I see no problem, but I am a rookie and obviously there is one. Anyone see what I'm doing wrong?
    Last edited by bibleguy125; 02-14-2012 at 01:24 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