+ Reply to Thread
Results 1 to 3 of 3

VBA Code to Add new worksheets & add a line to a summary tab with the correct data

  1. #1
    Registered User
    Join Date
    09-16-2020
    Location
    Pennsylvania
    MS-Off Ver
    365
    Posts
    2

    Question VBA Code to Add new worksheets & add a line to a summary tab with the correct data

    Hi, I am just starting to get into macro's/VBA. Attached is a spread sheet that I am trying to update. I have a simple macro in here that when I run the macro it adds a new "Item" tab and adds a line to the "Summary" tab from the corresponding tab. The issue is every time I run it it adds a new item tab correctly but the line that is created on the summary tab does not link to the newly created item tab. It works okay on the first run of the macro but the 2nd, 3rd, etc. time the lines on the summary page are still linked to "Item (2)" tab. The idea is to able to open the spread sheet. Click the macro for as many new item tabs as desired and have the summary of each tab summarized on the "Summary" tab.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA Code to Add new worksheets & add a line to a summary tab with the correct data

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-16-2020
    Location
    Pennsylvania
    MS-Off Ver
    365
    Posts
    2

    Re: VBA Code to Add new worksheets & add a line to a summary tab with the correct data

    That worked! Thank you so much for helping out with this.

+ 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. How can I plot the correct line graph from my data?
    By mmsood99 in forum Excel General
    Replies: 1
    Last Post: 05-22-2020, 10:28 PM
  2. [SOLVED] Macro to pull columns of data from multiple worksheets into summary worksheets
    By crandell84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2018, 05:44 PM
  3. [SOLVED] code is not working correct because all worksheets are red and A2 is not filled
    By torti111 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-16-2016, 11:00 AM
  4. VBA Code to Create One Summary worksheet of many worksheets in workbook
    By brandnew22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2014, 06:58 PM
  5. [SOLVED] Subject line: Pivot chart’s one line is correct but the other line not correct?
    By Mirisage in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-21-2014, 11:20 AM
  6. [SOLVED] Data not generating on correct line
    By melnemac32 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2013, 11:32 AM
  7. Fix Needed for Code to Send Correct Data to Correct Sheets
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2012, 03:53 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