return message if drive is full when saving a file

Posted on 2006-05-11
Last Modified: 2010-05-01
Hi experts
I would like to find if there is enough availible space on a hard drive before saving a file.
Need to use app.path to get drive letter.
Using vb6
Thank you
Question by:isnoend2001
    LVL 19

    Accepted Solution

    Take a look at the following code that displays available space on all drives:

    Then to get your current drive from app.path you could do:

    Dim myDrive As String
    myDrive = Left(App.Path, InStr(App.Path, "\"))

    Author Comment

    Thanks BrianGEFF719
    I get a overflow message with that program. I don't think it works with large drives

    Author Comment

    Hi BrianGEFF719
    I am giving you the points because i did not mention it had to work on huge drives
    i found the answer here:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    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…
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    737 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

    21 Experts available now in Live!

    Get 1:1 Help Now