+ Reply to Thread
Results 1 to 20 of 20

After filling in a cell -> create folder and hyperlink without manually running macros

  1. #1
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    After filling in a cell -> create folder and hyperlink without manually running macros

    Hello all,
    I am trying to figure out a way to automatically do
    1) create a folder, with the name used = excel cell value in Column A.
    2) automatically create a hyperlink to this folder.
    The process on my excel worksheet I want to get to is as follows
    1) Enter Title in Column C (example: C1 value is NAME)
    2) Then cell A1 is auto-populated based on CONCATENATE of A1 and B1 (fixed content column) (example NAME_1)

    AT THIS point in time, I would like to achieve GOALS 1&2 above without having to run a macro every time, with the following deliverables:

    1) a new folder located on the same directory as where my workbook is located.
    2) a hyperlink is generated in Column G (in our example, it would be in G1).

    So far I have gotten to the point of
    1) I can run a macro (either on a cell in Column A, or range within Column A) and this will generate the folders (and subfolders) indeed at the right location. This works :-)
    2) then, based on the fact that the name of my folder = cell value in the same row/column A - I just type =A(x) (in our example A1) and I have a macro that automatically converts this to a hyperlink to the right location (combination of didcellchange -->convert to hyperlink). This also works :-)

    I cannot take it to the next level - what I really want to do is as soon as I enter a Title in Column C, automatically, the workbook detects the change/data entry to Column C and
    1) creates a folder, with name based on the concatenate entry of COLUMN A
    2) creates a hyperlink to the folder in Column G

    OPTIONAL Nice-to-have(s) would be
    1) the macro actually giving an option to navigate to where the folders should be installed.
    2) hyperlink auto-updating correctly to the correct location (now pointing always to where the current workbook is located - Activeworkbook.path) / or if a link replies with Cannot find folder in specified location, a Browser window opens to update to the correct folder location
    I have a suspicion that this might be too complicated to achieve.
    If anybody can help with this, I would be extremely grateful - or if you indeed think that I am far too ambitious with this, let me know. :-)

    Any ideas?

    Kind regards
    Luke

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Ok, what happens when you change the name of someone in your list?

  3. #3
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Kyle, sorry, did not catch what you mean?

    Basically, what I am doing is the following - based on a strict naming convention
    1) I enter a name - say DATA in Column C
    2) I have already configured Column A to then generate a concatenate name with (Cell Cx_Cell Bx) (Column B has reference id's)
    3) Then I currently run a macro that generates a folder with the name as per Column A
    4) then on Column G, I just type = Ax and this sets the value in Gx as the hyperlink the folder.
    I want to find a way to eliminate 3 and 4 :-)

    The nice to have would also be nice..but not critical now.

    Luke

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Yes, got that

    What happens when the data in column B changes? When rows get deleted etc. What about the folders you've created?

  5. #5
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Column B never changes(it is locked as it has the reference ID's in there)
    Frankly speaking, if the data is deleted after the folder is created - then it makes no difference :-)
    same if it is deleted before a folder is created: The "create folder macro" just creates a named folder with the NAME_ as opposed to NAME_Reference ID.
    Then as G(x)=A(x), the hyperlink is still pointing to the right direction

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Ok so something like:
    Please Login or Register  to view this content.


    ---------- Post added at 11:15 AM ---------- Previous post was at 11:01 AM ----------

    What do you mean by not being saved as a macro?

  7. #7
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Kyle, dropped you a PM...thanks for this but something is not quite right (?)

    L

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    I know, I'm responding to it. What isn't quite right?

    ---------- Post added at 11:29 AM ---------- Previous post was at 11:17 AM ----------

    Please stop PMing me, if you're having issues, please post them here, that way it will help other people

  9. #9
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    decided to PM you again - before I even saw this...

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    The reason that you can't run this as a macro is that it's code that is put directly into the worksheet object of the sheet you are trying to use. Right click on the tab > view code and paste it there.

    It's there as you said you wanted it doing automatically, not by running a macro

  11. #11
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    I knew I was being thick - I had done a similar thing but by running a macro one to check for didcellschange and then after that never had to run it again!
    Thanks so much - one last question.
    If I wanted to include subfolders within the newly created folder, then
    MkDir (ThisWorkbook.Path & "\" & "\Name of folder")

    ?

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    No, you need to include the name of the folder you've created:
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Given that source of name is column A which is what is used in definition of tr in your code?
    can I change "Name of folder" to "tr"?

    Trying to find a way to automatically build folder and subfolders within the new folder...

  14. #14
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    yes so:
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    its OK I figures it out.
    Kyle, thanks so much!!!!!
    Last edited by LT1511; 07-29-2012 at 10:23 PM.

  16. #16
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Glad you got it working

  17. #17
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    @ LT1511

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  18. #18
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    Cutter, sorry. I totally forgot to mark this as Solved / though did put a comment towards the reputation of Kyle.

    Sorry about that!
    Luke

    ---------- Post added at 03:31 AM ---------- Previous post was at 03:30 AM ----------

    Kyle (or anybody out there )
    guess this would have to change somewhat in Mac (planning to use it on Office for Mac as well). I am not sure Dir works the same way in Mac + guess I would need to change \ to /?
    Any thoughts?
    Luke

  19. #19
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    I think everything you need is here:
    http://www.rondebruin.nl/mac.htm

  20. #20
    Registered User
    Join Date
    07-27-2012
    Location
    Central Europe
    MS-Off Ver
    Office 365 - Mac
    Posts
    23

    Re: After filling in a cell -> create folder and hyperlink without manually running macros

    my word. This did not even come up at all on my search.
    Looks like I have to fiddle quite a bit with the existing windows version.

    Thanks so much - hope I solve it :-)

    LT

+ 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