+ Reply to Thread
Results 1 to 3 of 3

Excel Macro Problems

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Excel Macro Problems

    Hi,

    I have a workbook with several worksheets that have data that is recorded weekly. I created a pivot table to sum up the data I need to record in a grand total per person sheet. After I create the pivot table and double click on a persons information it opens up an entire new sheet (example sheet1) What I wanted to do is create a macro that did all the work for me. However the problem I am having is every time I double click a new person information from my pivot table it names the new sheet the next number in line (example sheet2,sheet3) ect... I need a way for the sheet to stay the same name when I run my macro.

    Can someone guide me to a solution? Here is my code I have so far.

    A few problems I am having are as follows:


    1) Everytime I click my button macro it pulls the same persons data reguardless of where the cursor is at.The first person is at "b3" but they can go down as far as "b50".

    2) You can see it always referances (sheet1) I need it to always referance the new sheet that was just created at the begining of the macro.

    3) I would like this sheet deleted without asking if I was sure I wanted to delete it.

    4) Lastly I want it to return to the first sheet and select the next cell down, Problem 1 always takes cell "b3" I would like the macro to pick for example b4 and so on each time it runs till It runs out of data.
    Please Login or Register  to view this content.
    Thanks for any help somone can provide.
    Mike
    Last edited by Leith Ross; 03-20-2008 at 01:49 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello realniceguy5000,

    Welcome to the Forum!

    To make your posts easier to read and preserve your formatting, please wrap your code. I did it for you this time. Here is how you can do it next time.

    How to wrap your Code
    On the Message window Toolbar you will see the # icon. This will automatically wrap the text you selected with the proper HTML tags to create a Code Window in your post. You can do this manually by placing the tag [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] at the end.

    As a new member please read the Do's and Don'ts here in the Forum. Click on the link below...

    Forum Rules

    Sincerely,
    Leith Ross

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    In addition to Leith's suggestions, please start a new thread with a descriptive title.

+ 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