Results 1 to 12 of 12

Run-time error 13 (Type Mismatch)

Threaded View

  1. #1
    Registered User
    Join Date
    11-15-2011
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    74

    Run-time error 13 (Type Mismatch)

    hi,
    i am a new user of module in excel.

    When i run the following code i get the "Type mismatch" error dialogue box. It was running fine a few hours ago.

    What is amusing is that it sometimes give the "Application or object-defined" error dialogue box as well.

    What shall i do to resolve this? And, what could be causing 2 different error dialogue boxes for the same code?

    Sub addvalues()
    
    For i = 2 To Worksheets.Count
    
        For j = 12 To 87
    
    
            For k = 6 To 20
        
                 Worksheets(1).cells(j, k) = Worksheets(1).cells(j, k) + Worksheets(i).cells(j, k)
        
             Next k
        
        Next j
    
    Next i
    
    End Sub
    Last edited by prajesh; 11-15-2011 at 05:45 AM. Reason: solved!!!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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