+ Reply to Thread
Results 1 to 4 of 4

Dynamic Sheet Name in VBA

  1. #1
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Dynamic Sheet Name in VBA

    Hello,

    I need some pointers about how to correctly reference a sheet name based from a cell value. I currently have two sheets for example: 1. "Home" 2. "Summary 1".

    On "Home" in cell H1 will be the name of the "Summary" tab (cell H1: "Summary 1"). I am trying to use VBA to reference that text and use it for a dynamic sheet name in the code.

    Please Login or Register  to view this content.
    In the live workbook there are 8 sheets (Summary 1, Summary 2, Summary 3, etc). The above is just modified from a macro recorder so if there is a better looping formula I am interested to see how that works. Or just how to dynamically reference a sheet name per the above.

    Thank you for any thoughts or suggestions.

    Thank you for reading!

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,361

    Re: Dynamic Sheet Name in VBA

    Maybe:
    Please Login or Register  to view this content.
    Or even:
    Please Login or Register  to view this content.
    Last edited by CheeseSandwich; 05-13-2022 at 12:07 PM.
    If things don't change they stay the same

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Dynamic Sheet Name in VBA

    A little more difficult (at the beginning of learning), but faster:
    Please Login or Register  to view this content.
    Artik

  4. #4
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Dynamic Sheet Name in VBA

    Thank you both and it is working now. I was forgetting to divide the worksheet reference from the range. I also should not have relied on macro recorder so heavily hahaha. I thought it would be a bit quicker at first . Thank you both again.

+ 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. Dynamic command button in a dynamic sheet
    By dorabajji in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-05-2019, 07:56 AM
  2. [SOLVED] Clear dynamic named sheet, compare cells from 2 sheets, copy all matched rows to dynamic s
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-15-2015, 12:31 PM
  3. Dynamic graph for dynamic sheet.
    By Tona in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-26-2015, 05:05 AM
  4. How to set a dynamic sheet or a line number dynamic from variant variables
    By skulo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2015, 09:58 AM
  5. Replies: 0
    Last Post: 03-04-2013, 03:25 PM
  6. [SOLVED] Macro: Dynamic creation of sheet based on cell value then copy range to the new sheet
    By BeachRock in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-15-2012, 11:31 AM
  7. Creating Dynamic Folders/WorkBook from a Sheet with Dynamic Path.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-28-2011, 05:42 AM

Tags for this Thread

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