Get file's MD5 checksum using VB6

Posted on 2009-04-19
Last Modified: 2013-11-25
How can I get the MD5 checksum of a file, could you please provide the code and would really appreciate if this is not a DLL.
Question by:ctdt
    1 Comment
    LVL 32

    Accepted Solution

    a quick google search....

    a VB6 class from see  (or looks best.
    to use it, open a file, read all into a string and call the MD5 method of the class.  see for more methods.

    other code is from by OnErr0r                               , original author unknown.  this may be easier to test with but use is the same

    dim GetHash as CMD5, sHash as string
    sHash = GetHasj.MD5("this is a test string")

    Open in new window


    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now