+ Reply to Thread
Results 1 to 29 of 29

please help me to refresh the macro to hyperlink the sheet name

  1. #1
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    please help me to refresh the macro to hyperlink the sheet name

    Hi,

    I have the code and it works as below.

    I assigned the code to a button. Once I click on the button, it will copy the sample sheet with the sheet name that I provide, and the same name will be added to the summary page along with formula and format from the sample row. I need your help to create a hyperlink using the macro between the sheet and the sheet name updated on the summary page. Please help me where I need to add the line in the existing code below.

    Also, before creating/copying the first new sheet, I will hide the sample sheet and the sample row in the summary page since no one should see it but I am facing an issue if I hide the sample sheet and the sample row in the summary page before creating/copying a new page and click on the button to create a new page, the new page and the row are hidden by themselves. please help.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Thank you, Byte; I am getting an error as below when I click on the hyperlink.

    For example, I created a sheet ABC. A hyperlink is created using your code, but if I click the hyperlink, I get an error, as given in the attached file.

    Also, as I mentioned previously, before copying or creating the new sheet, I hid the sample sheet and the sample row in the summary page manually, but when I ran the code, even the new sheet and new row were hidden by themselves.
    Attached Images Attached Images

  4. #4
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Sorry, it should be

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Thank you. It works; what about the page and the row from the summary sheet getting hidden? Attached is a screenshot for your reference.

    Before I click on the click me button, I hide the sample sheet, and also I hide the Sample row in the summary sheet manually. Once I click on clickme button and add the sheet name "abc1". sheet "abc1" got hidden also the hidden sample sheet name got renamed "Sample (2). Also, I hide Row 6 manually since it is a sample row but if you see on the screen shot even Row 7 is hidden. When I unhide the rows the sample row has moved below to the newly created sheet. Please help.

    Or help me to add the macro code in the existing code that the sample sheet and sample row should hide as soon as new sheet is created.
    Attached Images Attached Images
    Last edited by Giri.hb; 10-31-2024 at 11:25 AM.

  6. #6
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Could do it like this:
    NB: I think at the moment your indirect formulas don't account for a name containing a space.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Thank you for the quick reply. the above code is hiding ROW6. I don't want to refer to the Row6. since sometimes the table will start from different rows, so whenever the COlumn A is having the word Sample that Row should get hide.

    Also, I want to hide the sheet named Sample as well.

  8. #8
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Also, I hide Row 6 manually since it is a sample row but if you see on the screen shot even Row 7 is hidden
    Sorry I thought the fact that it was hidden was the issue?

    If you hide the Sample sheet it should still work in that regard.

  9. #9
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Sorry for the confusion, I just gave an example row 6 but the sample row should hide irrespective of any rows.

    Also if I hide sample sheet and create new sheet even new sheet will get hide and the sample sheet will get auto renamed to sample 2. Please help that sample sheet name should not change and the new sheet should not auto hide when it created.

  10. #10
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Is this what you mean?
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Yes, it works; the only issue is regarding Row 6. Sometimes, my table starts from Row 8 or 10 or 15 on the summary page. So, in the code, please remove the Row 6 reference. Instead, you can give a reference stating that if the A column has the word "Sample," that row should be hidden.

  12. #12
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Hi Byte,

    Please help me with the above request.

  13. #13
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Sometimes, my table starts from Row 8 or 10 or 15 on the summary page
    The sample file only had one row (Sample) so I'm not really sure what this means.

    Also "Sample" is the name of the template sheet, so if you try to add another line called Sample it'll fail since that sheet name already exists.

  14. #14
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Yes, the sample file had one row (Sample), and I needed to hide it. It will not always be in Row #6; sometimes, it will be in a different Row number. For example, on the summary page, the table header starts from Row#10. The sample Row will be on Row #11, and Row #11 should hidden. If the table header is on Row 12, and the sample row is on Row #13, it should hidden.


    So whenever I create a new sheet using the button, the sheet should be created after the sample sheet. On the summary page, the new sheet name should come below the "sample" row, and the sample row should be hidden.

  15. #15
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Maybe like this

    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Yes, it worked as per my request; one thing is that the new sheet is created before the sample sheet, and I need that new sheet to be created after the sample sheet.

    Apart from that everything is working fine.

  17. #17
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,622

    Re: please help me to refresh the macro to hyperlink the sheet name

    Try:
    It moves the Sample sheet to the 2nd position if it isn't there already.

    Please Login or Register  to view this content.

  18. #18
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Thank you very much, it really worked well as per my request. I will mark it as solved now

  19. #19
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Hi Byte, I am facing one issue using the above code. Please help.

    When the new sheet is created, on the summary page the new sheet name is getting added outside the table. Actually, the header and the sample row are under "Table". Also, the formula and format are getting copied from the above row, I need it should be copied from the sample row instead of the above row. If I update the data manually in the above row, even those data are copied to the new row.

  20. #20
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Please someone help me on this request.

  21. #21
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    389

    Re: please help me to refresh the macro to hyperlink the sheet name

    Dear Giri.hb

    Try this
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Mark Thread as Solved...

  22. #22
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    I am facing one issue: In Column A, I need to get the newly created sheet names below the sample row, and they should hyperlink to the respective sheet, but it is not working. Also, as soon as the first sheet is created, the sample row should be hidden.

  23. #23
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    389

    Re: please help me to refresh the macro to hyperlink the sheet name

    Try this
    Please Login or Register  to view this content.
    Attached Files Attached Files

  24. #24
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    After the sample row, the next row is coming inside the table, and other rows are not getting inside the table.

    Also, the formula will be copied from column B to Column W to the below row. If I add the formula in column x on the sample row in the future, even that should be copied automatically and that column should get added to inside the table.

  25. #25
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    389

    Re: please help me to refresh the macro to hyperlink the sheet name

    Dear

    now i update the vba please check

    Please Login or Register  to view this content.
    Attached Files Attached Files

  26. #26
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Thank you for sharing the code will check and get back to you.

  27. #27
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    389

    Re: please help me to refresh the macro to hyperlink the sheet name

    Check this also

    Please Login or Register  to view this content.
    just replace the code and run the code

  28. #28
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    The code is not working as per my requirement. My report does not always start from Row 6 or 5; sometimes, it may go up or down. if you see the screen shot below, I created 3 sheets, only one sheet name added inside the table and other 2 sheet names are outside the table.
    Attached Images Attached Images

  29. #29
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    218

    Re: please help me to refresh the macro to hyperlink the sheet name

    Hi Sudbhavani,

    I rewirte the code and it is working as per my request. Attached file for your reference.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] macro creates new sheet and names it, need to create hyperlink to new sheet on main sheet
    By cjburns in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-03-2020, 11:26 AM
  2. Refresh each excel sheet 1-by-1 using Macro/VBA
    By ukki in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2020, 07:18 AM
  3. Replies: 0
    Last Post: 01-07-2013, 08:39 PM
  4. [SOLVED] Refresh active sheet before performing Macro
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 01:02 AM
  5. [SOLVED] Macro to refresh a sheet when opening
    By amotto11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2012, 03:54 PM
  6. hyperlink to refresh with current macro
    By step_one in forum Excel General
    Replies: 1
    Last Post: 08-13-2011, 05:57 PM
  7. macro to refresh a sheet
    By Ramzes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-19-2011, 03:16 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