VB6 run-time error '13' Type mismatch

AnitaLakandula 1 Reputation point
2022-09-14T03:05:26.973+00:00

Hello there , I am trying run the vb6 app using windows 10, it is showing Run-time error 13: Type Mismatch error.

this is the line containing the error highlighted in yellow!
MsgBox Err.Number & " - " & Err.Description, " modSystem", " Main" ', eSystemResume

the app works perfectly fine using windows 7.

how am I suppose to fix the error? appreciate the help :)

Developer technologies | Visual Basic for Applications
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Viorel 122.6K Reputation points
    2022-09-14T08:16:28.453+00:00

    Try these variations:

    MsgBox Err.Number & " - " & Err.Description, vbSystemModal, "Main"

    or

    MsgBox Err.Number & " - " & Err.Description

    0 comments No comments

  2. AnitaLakandula 1 Reputation point
    2022-09-15T04:04:06.717+00:00

    @Viorel tried this but another compile error pops out.

    this one came from the log
    Line 220: Class MSComctlLib.StatusBar of control StatusBar1 was not a loaded control class.
    Line 253: Class MSComctlLib.ProgressBar of control ProgBar was not a loaded control class.

    since i have not yet to registered msdatsrc.tlb because theres no regtlib in my C:\Windows\Microsoft.NET\Framework64\v4.0.30319. note that i am using windows 10

    241283-image.png

    0 comments No comments

  3. Ravi Sawle 0 Reputation points
    2023-04-13T20:42:13.36+00:00

    I have applied filter and I am trying to select a cell from the very next row but I could not. Can anyone help me on this. Additionally, I have tried to use string variable to store the cell data as, Dim text as string Text =Wb.Ws.Range("Q2:Q" & Lr).specialcells(Xlcelltypevisible).offset(0,1) When I tried to execute it is throwing typemismatch error

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.