+ Reply to Thread
Results 1 to 3 of 3

ADODB connection - Changing connection path via fileDialog

  1. #1
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    ADODB connection - Changing connection path via fileDialog

    Hello,

    I use the following code to create a connection to another workbook.
    But what if I want the user to be able to choose which workbook he or she needs to connect to?

    I want "strDBPath = "P:\SE\AVK\C. Projektmodell\Pärmen\APL\APL.xlsx" to be equal to the file the user chooses form a filedialog.

    Anyone know if this is possible?


    Thanks!

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    05-04-2015
    Location
    Bangalore, India
    MS-Off Ver
    2013, 2016
    Posts
    12

    Re: ADODB connection - Changing connection path via fileDialog

    strDBPath = Inputbox("Enter the database path"),

    This will open up a box where the user can paste the required path which gets saved for the same variable strDBPath

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: ADODB connection - Changing connection path via fileDialog

    For example:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing connection string path to a dynamic path
    By Shevi in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-11-2014, 05:16 AM
  2. ADODB Connection from different workbook
    By Roshan10043 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2013, 11:24 PM
  3. ADODB.Connection Closed due to .commandtext changing from original
    By gwsampso in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2012, 07:07 PM
  4. VBA and ADODB.Connection
    By AedanLee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-29-2010, 06:37 AM
  5. excel ADODB.connection to itself ? how?
    By djorkaef in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2010, 11:28 AM

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