+ Reply to Thread
Results 1 to 4 of 4

Duplicating VBA Macro on Another worksheet in Same workbook

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    639

    Duplicating VBA Macro on Another worksheet in Same workbook

    I have a worksheet(Morning Reports) that has a running macro on what I need is how do I get this same code to work on a different sheet titled (Afternoon Reports) This afternoon report will be a scaled down version with slightly different range:

    How do I modify this code to do the same thing just on a different sheet

    Please Login or Register  to view this content.




    I also attached the worksheet if anyone needs it to look at.

    Protection password is "Financial3" and sheet and VBA
    Last edited by bdouglas1011; 08-06-2014 at 03:12 PM. Reason: Revised question to show code

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Duplicating VBA Macro on Another worksheet in Same workbook

    Have you tried replacing "Morning" with "Afternoon"??
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    639

    Re: Duplicating VBA Macro on Another worksheet in Same workbook

    Yes I changed all my Subs to have the Number 2 after so it was like a new Macro, then I changed every Morning report to afternoon report, but I kept getting a error when the macro got so the input question.

    Please Login or Register  to view this content.
    I got error with the retval line: so I added " ' " infornt of all of them and tried to rerun and not have the question then I got a new error:

    Please Login or Register  to view this content.
    it highlighted the olByValue, 0 on the attachment line.

    I then deleted "olByValue, 0" - now it is seem to run OK but I am not sure why my question quit working from one sheet to the other.

    any suggestions.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Duplicating VBA Macro on Another worksheet in Same workbook

    Please Login or Register  to view this content.
    does nothing?

+ 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. Duplicating Infromation from one worksheet to another?
    By zsavage81 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 04-16-2014, 09:58 AM
  2. Replies: 2
    Last Post: 10-08-2012, 03:23 AM
  3. Duplicating data from one worksheet to another
    By charliep in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-07-2008, 12:26 PM
  4. Duplicating Formulas within Worksheet
    By atomlins in forum Excel General
    Replies: 2
    Last Post: 11-29-2007, 03:43 AM
  5. Duplicating info in another worksheet
    By carlav60 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-23-2007, 05:37 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