Results 1 to 7 of 7

Block if without end if?

Threaded View

  1. #1
    Registered User
    Join Date
    10-12-2010
    Location
    London, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    4

    Block if without end if?

    Sub weekly_reset()
    
    If Range("a22") = 0 Then
        Range("a22") = Range("M14")
    
    If Range("b22") = 0 Then
        Range("b22") = Range("M14")
        
    If Range("c22") = 0 Then
        Range("c22") = Range("M14")
    
    If Range("d22") = 0 Then
        Range("d22") = Range("M14")
    
    Else: Dim Msg As String, Ans As Variant
    
        Msg = "Four weeks have passed. Do you want to reset the weekly log and start a new month?"
    
        Ans = MsgBox(Msg, vbYesNo)
    
        Select Case Ans
    
            Case vbYes
        
            Range("A22:d22").ClearContents
            Range("a22") = Range("M14")
            
            Case vbNo
            GoTo Quit:
        End Select
        
    End If
    
    Range("M14").ClearContents
    
    End Sub
    Why does this keep telling me "block if without end if" when there clearly is an "end if"

    excel 2010 btw

    thanks
    Last edited by vonblart; 11-16-2010 at 02:10 PM. Reason: title change per request

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