Results 1 to 3 of 3

run-time error 13: type mismatch in VBA (Excel 2007)

Threaded View

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    39

    run-time error 13: type mismatch in VBA (Excel 2007)

    hello,
    I'm writing a VBA program and receive "run-time error 13: type mismatch"

    this is the code in bold where it happens:
            Let FactornEMA(nEMA) = 2 / (FactorMA(nEMA) + 1)   'run-time error 13: type mismatch
                  
            Let Cells(1 + nData, colEMA(nEMA)) = FactornEMA(nEMA) * (Cells(1 + nData, 4) - Cells(nData, 4))
                  
            Else
            End If
    For clarification, FactorMA(nEMA) is an array of about 2 possible values a and b.

    I have all parts of the line defined as variables and I use that calculation as a constant in the next line.
    Can somebody tell me why I receive this error?
    Thanks.
    Last edited by zeno1; 04-20-2012 at 03:26 PM.

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