+ Reply to Thread
Results 1 to 8 of 8

Data Validation linked to folders in ActiveWorkbook.Path

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Data Validation linked to folders in ActiveWorkbook.Path

    Hello,
    I have a folder located in the ActiveWorkbook.Path, called “Sales”
    The “Sales” folder might contain various subfolders, for example:
    East Teritory
    West Teritory
    North Teritory
    South Teritory
    but could be anything else….
    I need to “Data Validate” a cell which would pull up at the Data Validation Drop Down the subfolders names and when a subfolder is selected from the Drop Down, I want that cell to be hyperlinked to the subfolder.
    (see screenshots)
    Please advice.Screenshots.JPG
    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Data Validation linked to folders in ActiveWorkbook.Path

    Try this.

    How it works
    The macro kicks in automatically when the cell value is changed, taking the user to the selected subfolder of activeworkbook.path\sales\ (indicated by the cell value)

    What to do
    - Paste this code into the module of the sheet containing the cell with validation
    - Amend "$A$2" to the correct cell reference - include both "$" symbols
    (right click on sheet tab and select View Code)
    - Change selected value in the cell and see if it works!

    Please Login or Register  to view this content.
    If a response has helped then please consider rating it by clicking on *Add Reputation below the post
    When your issue has been resolved don't forget to mark the thread SOLVED (click Thread Tools at top of thread)

  3. #3
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Re: Data Validation linked to folders in ActiveWorkbook.Path

    Kevin,
    Thank you very much.
    It works!
    I just wanted to amend it :
    I want that cell to be hyperlinked to the subfolder
    I mean, instead of having the .Show, I want the cell to be hyperlinked to the target folder.
    Is that possible?
    Thanks again.

  4. #4
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Data Validation linked to folders in ActiveWorkbook.Path

    I expected you to say something like this. A hyperlink opens a file, activates a worksheet, opens a web page etc.
    What are you aiming to do when you get to the subfolder?

  5. #5
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Data Validation linked to folders in ActiveWorkbook.Path

    'Removed and replaced by post#3
    Last edited by Kevin#; 04-10-2016 at 03:31 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Data Validation linked to folders in ActiveWorkbook.Path

    Does this meet your needs?

    Put this in the sheet module and amend $A$1 to match the relevant cell
    Macro creates the link on the hoof and takes you there

    Please Login or Register  to view this content.
    Last edited by Kevin#; 04-10-2016 at 03:48 AM.

  7. #7
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Re: Data Validation linked to folders in ActiveWorkbook.Path

    Kevin,
    Thank you, this is it.
    Works fine!

  8. #8
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Data Validation linked to folders in ActiveWorkbook.Path

    Great.
    Please mark the thread as solved

+ 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. [SOLVED] Generate Folders and Subfolders list located in the ActiveWorkbook Path
    By plans in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2015, 04:11 PM
  2. [SOLVED] Macro to Delete folders more than X MB from a given path
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-05-2014, 09:56 AM
  3. [SOLVED] Excel 2010 Activeworkbook.path
    By launas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2014, 02:30 PM
  4. Get partial string from ActiveWorkBook.Path
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-30-2009, 11:14 AM
  5. File path of DIrectory and Folders only
    By teachMeExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2009, 11:02 PM
  6. [SOLVED] Trying to open folders in the Path
    By Davie in forum Excel General
    Replies: 1
    Last Post: 04-28-2005, 05:06 PM
  7. [SOLVED] xlDialogOpen.Show or Activeworkbook.Path?
    By Mike Echo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2005, 06:07 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