+ Reply to Thread
Results 1 to 5 of 5

Automatisation for workbook and link creation

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Automatisation for workbook and link creation

    Hi everyone,

    I am new to this forum, but it was recommended to me by a friend and if it is only half as good as he said, my question is going to be a piece of cake for you

    Currently I am trying to create a tool that creates reports about each user :

    1) The goal is that it creates sheets according to a list and a template for each user. The sheets' names should be the name of the user and its location (a two letter code).

    This already works using the following code:

    Please Login or Register  to view this content.
    2) Now i need to add hyperlinks (buttons) to each users sheet that brings me back to the Summary Page, and buttons to the summary page that brings me to each users sheet.


    I already tried a couple of codes on various websites, but none of it seems to work and do exactly what i want it to do. I am pretty new to vba so i really really hope you can help me with this problem.

    Did anyone already create a file similar to the one i am looking for or can help me with my problem? I already googled for more than 4 days and it would be a hughe relief if i finally had this file


    Thank you very much in advance

    PS: I attached the file i am talking about, I hope this helps solving my problem
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,290

    Re: Automatisation for workbook and link creation

    Why not just create a hyperlink on the Template sheet ... then, when you create a new user sheet from the Template, the link is already built in. No additional code required.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    07-12-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Automatisation for workbook and link creation

    Thanks TMSHUCKS, i think This could work for the link from the sheet back to the summary but not for the one to the users individual sheets - is there a way to automaticaly add a button next to the user on the summary sheet?

    Regards

    Chris

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,290

    Re: Automatisation for workbook and link creation

    Not sure about creating buttons.

    You could create a hyperlink formula in a cell. For example, if you put this in cell B12, say:

    =IF(ISBLANK(A12),"",HYPERLINK(CONCATENATE("[",MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1),"]",A12,"!A1"),A12))

    and then put a sheet name in cell A12, it will create a hyperlink to the sheet; while A12 is empty, B12 would also be empty. The "!A1" is the cell selected when the hyperlink is followed and the sheet activated. You could put the User ID/Sheet Name in the cell ... or change the formula to refer to the User ID elsewhere on the row

    The button link back to the summary sheet is fine as it is static and can be created once on the Template sheet.

    I'm a bit confused by your example as none of the sheet names seem to relate to any User IDs, hence the general reply.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    07-12-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Automatisation for workbook and link creation

    Quote Originally Posted by TMShucks View Post
    Not sure about creating buttons.

    You could create a hyperlink formula in a cell. For example, if you put this in cell B12, say:

    =IF(ISBLANK(A12),"",HYPERLINK(CONCATENATE("[",MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1),"]",A12,"!A1"),A12))

    and then put a sheet name in cell A12, it will create a hyperlink to the sheet; while A12 is empty, B12 would also be empty. The "!A1" is the cell selected when the hyperlink is followed and the sheet activated. You could put the User ID/Sheet Name in the cell ... or change the formula to refer to the User ID elsewhere on the row

    The button link back to the summary sheet is fine as it is static and can be created once on the Template sheet.

    I'm a bit confused by your example as none of the sheet names seem to relate to any User IDs, hence the general reply.

    Regards, TMS
    Hi TMS, Thanks for you fast answer again
    To answer your first question: The sheets are being created as soon as you run the makro in the file. And I got the button back to the main sheet working, thanks however the Hyperlink solution you proposed unfortunately won't work for me, since I am handing this over to people with literally no excel skills (everything that does not look like a button is no button for them). So I have to figure out how to create a buttonfor each customer, any ideas?

    In addition is there a possibilty to only add sheets for new customers, e.g. customers that to not have their "own" sheet yet?

    Thanks a lot for your help

    Chris

+ 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