Results 1 to 3 of 3

Thread: Help needed Run-Time Error 13: Type missmach

  1. #1

    Help needed Run-Time Error 13: Type missmach

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi I`m useing Excel 2010 I have a macro which gives me Run-Time Error 13: Type missmach every time I try to lounch it. Can anybody help me? An error code line is folowing:

    Private Sub ProcessRace(nIndexStart As Long, nIndexEnd As Long, nCols As Long, bIsCreateCSVReport As Boolean, asRaces() As String, sFileName As String)

    oReport.RaceAnalysis nIndexStart, nIndexEnd, nCols, bIsCreateCSVReport, asRaces()

    End Sub

    Here is also link to screenshot of error line

    Thanks for in advance =)

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Excel Version
    I think we need to see the other procedures, especially oReport.RaceAnalysis

  3. #3
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Nanaimo, BC, Canada
    Blog Entries
    Excel Version
    Excel Office 365 Insider
    I agree with Bob, but it may also be helpful to see the routine that calls ProcessRace. I wonder if you were to specially typecast the variables you're feeding it if the error would happen there. I.e. nIndexStart = CLng(myinput) would make sure you've actually passed it Long data and not an Integer or something.
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: -||- Blog: -||- Forums:
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

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