Consulting

Results 1 to 2 of 2

Thread: Anyone see the compile error?

  1. #1

    Anyone see the compile error?

    Not quire sure whats wrong here. Being told 'End With without With'

    [VBA]Application.ScreenUpdating = False

    With Activesheet

    lastrow = .Cells(.Rows.Count, "B").End(xlUp).Row
    For i = lastrow To 2 Step -1

    If .Cells(i, "A").Value = "" Then

    .Cells(i-1, "B").Value = .Cells(i-1, "B").Value & " " & .Cells(i, "B").Value
    .Rows(i).Delete
    End If
    End With

    Application.ScreenUpdating = True
    End Sub [/VBA]

  2. #2
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    You are missing a Next i before the End With
    Be as you wish to seem

Posting Permissions

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