Results 1 to 4 of 4

Automatically detect and change drive letter

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Automatically detect and change drive letter

    Good Afternoon Guys

    On a userform with a button to open another workbook and close the current one, I use this code..... It works fine, however it will be used by different people and may need to sit on different drive for some.

    The folder structure will remain the same but how do I change it to automatically detect and change the path for the different drives

    Private Sub cmdhands_Click()
        Workbooks.Open Filename:="H:\Compliance Information\H&S\H&S Access.xls"
        ThisWorkbook.Close SaveChanges:=True
    End Sub
    Many thanks for your help

    JT
    Last edited by JamesT1; 07-26-2013 at 11:54 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Drive Letter Property not returning mapped drive letter
    By Mike_bee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2013, 02:45 PM
  2. Detect new drive if main folder is moved
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-29-2012, 07:00 AM
  3. Auto change drive letter
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2008, 05:54 AM
  4. Detect if File is opened on USB Drive
    By tekman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2008, 09:56 PM
  5. Reference drive letter that can change
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2005, 05:05 PM

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