Drag a text file onto an exe

Posted on 2005-05-09
Last Modified: 2010-05-02

I am making a application that will convert data from a text file to other formats.  I want it to run by the user dragging and dropping the text file onto the exe.

Basically, once the file is dropped I need the path to its location in order to open and read it..  

In vb6 what method of the form will be activated by this? do I even need to do this within a form...could it just be a module?

Thanks in advance!
Question by:sarahjackel
    LVL 26

    Accepted Solution

    'create a new project

    Option Explicit

    Private Sub Form_Load()
        MsgBox Command$
    End Sub

    'compile to exe and drag and drop the file into
    ' you should see the file name from msgbox

    Author Comment

    Absolutely terrific!  Thanks for the super fast answer!

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    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…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    734 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

    23 Experts available now in Live!

    Get 1:1 Help Now