+ Reply to Thread
Results 1 to 4 of 4

Edit VBA Code Which Automatically Creates New Worksheet

  1. #1
    Registered User
    Join Date
    07-14-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    12

    Edit VBA Code Which Automatically Creates New Worksheet

    Hi,

    I am having issues with the following code:-

    Please Login or Register  to view this content.
    It works in part but I have issues with the following:-

    1) It creates a new worksheet when I enter a value into the K12:K44 range on my master worksheet which is correct, but I need it to only create a new worksheet if the value is "Yes". The values entered into this range will be either "Yes" or No".
    2) When it creates the new worksheet, it names the worksheet as the cell value from the range K12:K44. I need it to name the worksheet as the cell value from the corresponding row of range A12:A44. These values will be numerical.
    3) It does create a hyperlink to the newly created worksheet, but the hyperlink needs to be applied to the cell from range A12:A44. At the moment it creates it in the cells of range K12:K44.

    There is also 1 other minor issue.

    The master worksheet has a summary of information which currently runs from rows 12 to 44. If I were to insert 2 additional rows within 12 to 44, I now have information that covers rows 12 to 46, but the range in VBA code is still row 12 to 44. Is there a way so have the code update the range if additional rows are inserted?

    I have attached the workbook and hopefully everything above makes sense.

    Many thanks in advance.
    Attached Files Attached Files
    Last edited by central_boy_wonder; 04-15-2021 at 06:06 AM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,808

    Re: Edit VBA Code Which Automatically Creates New Worksheet

    Give this a try and let us know if it does what you need.
    Please Login or Register  to view this content.
    BSB
    Last edited by BadlySpelledBuoy; 04-15-2021 at 09:56 AM.

  3. #3
    Registered User
    Join Date
    07-14-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    12

    Re: Edit VBA Code Which Automatically Creates New Worksheet

    That's great BSB, it seems to be working brilliantly!

    I'll get the team to start using it and will let you know if we have any issues.

    Thanks a lot!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,808

    Re: Edit VBA Code Which Automatically Creates New Worksheet

    Glad I could help

    BSB

+ 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. Replies: 3
    Last Post: 03-16-2021, 09:43 AM
  2. [SOLVED] Edit VBA code without automatically executing code
    By Andrew Entee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2017, 02:38 PM
  3. [SOLVED] User input on worksheet to directly edit or amend code in VBA
    By Crooza in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2014, 06:35 PM
  4. How do I edit this code to make it update automatically?
    By Matt2014 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2014, 11:13 AM
  5. Excel Creates Graphs automatically
    By daveealex in forum Excel General
    Replies: 5
    Last Post: 06-16-2011, 06:10 AM
  6. Code creates new workbook-> code to automatically run a set code on that workbook
    By cwalker6 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2009, 08:00 PM
  7. Looking for add-in to edit HTML code in select worksheet cells
    By Mr. Chip in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2007, 03:58 PM

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