+ Reply to Thread
Results 1 to 2 of 2

define a database path

  1. #1
    Laurent M
    Guest

    define a database path

    Hello,

    my application use a database and needs its path for many functions.
    I have a dialog box to choose the path but i call it every time i call a
    function, it's not really user friendly

    So how can i define the path at the first opening of my application, and
    stock the path anywhere so the dialog box won't appear anymore?

    Many thanks

  2. #2
    Dave Peterson
    Guest

    Re: define a database path

    John Walkenbach shows a way to browse for folder at:
    http://j-walk.com/ss/excel/tips/tip29.htm


    You could ask once and keep that folder name in a public variable--declare it
    outside the any function/procedure.

    Option Explicit
    Public MyFolder as string

    Sub test1()
    if myfolder = "" then
    myfolder = GetDirectory("Select A folder")
    end if

    '...do lots of stuff
    End Sub



    Laurent M wrote:
    >
    > Hello,
    >
    > my application use a database and needs its path for many functions.
    > I have a dialog box to choose the path but i call it every time i call a
    > function, it's not really user friendly
    >
    > So how can i define the path at the first opening of my application, and
    > stock the path anywhere so the dialog box won't appear anymore?
    >
    > Many thanks


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1