+ Reply to Thread
Results 1 to 9 of 9

How to combine code from multiple sheets to one sheet

  1. #1
    Registered User
    Join Date
    09-10-2018
    Location
    Cleveland, Ohio
    MS-Off Ver
    2016
    Posts
    29

    How to combine code from multiple sheets to one sheet

    How do I write this so its all on one sheet and still functions the same

    Please Login or Register  to view this content.
    Last edited by dominicb; 09-12-2018 at 10:18 AM. Reason: Code tags added

  2. #2
    Registered User
    Join Date
    07-20-2018
    Location
    Quezon City, Philippines
    MS-Off Ver
    Excel 2013
    Posts
    84

    Re: How to combine code from multiple sheets to one sheet

    I may be wrong but I don't think you can write in on one sheet only - because it is triggering different events on different sheets..

  3. #3
    Registered User
    Join Date
    09-10-2018
    Location
    Cleveland, Ohio
    MS-Off Ver
    2016
    Posts
    29

    Re: How to combine code from multiple sheets to one sheet

    Well how would I write to create different events on the same sheet?

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: How to combine code from multiple sheets to one sheet

    God afternoon Braden8898

    You combine them both into one module.
    They are both triggered by the same event, and you can only have one module, per object, per specific event.

    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  5. #5
    Registered User
    Join Date
    09-10-2018
    Location
    Cleveland, Ohio
    MS-Off Ver
    2016
    Posts
    29

    Re: How to combine code from multiple sheets to one sheet

    Im Not sure how to do that? When I open a module and right click to select userform it places it in the same spot as the others. How do I move the Code/UserForms into 1 Module

  6. #6
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: How to combine code from multiple sheets to one sheet

    Hi Braden8898

    Please remember that I've never seen the file you are working on, nor do I know what it ultimately will do.

    All I've got to go on is what you've posted, which, frankly, isn't much. Something to do with Sheet1 and/or Sheet2 and in your last post you've started mentioning userforms!

    You need to describe to me exactly what you've got, what you want and what's happening or not happening.

    HTH

    DominicB

  7. #7
    Registered User
    Join Date
    09-10-2018
    Location
    Cleveland, Ohio
    MS-Off Ver
    2016
    Posts
    29

    Re: How to combine code from multiple sheets to one sheet

    Ok so this is a screenshot of what D3 does when selected. What I need to have accomplished is the same comment box with different text in several other cells.
    Screenshot.png
    Last edited by Braden8898; 09-12-2018 at 10:30 AM.

  8. #8
    Registered User
    Join Date
    09-10-2018
    Location
    Cleveland, Ohio
    MS-Off Ver
    2016
    Posts
    29

    Re: How to combine code from multiple sheets to one sheet

    Here is the code on sheet 1. The only way I have been able to make this work is by putting new code on new sheet (Sheet2)

    Attachment 589963

  9. #9
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: How to combine code from multiple sheets to one sheet

    Hi Braden8898

    So yada and yada1 are userforms? Both of these are set up?
    If so, then the post I gave you in post 4 should work.

    Remove the Worksheet_Selection module currently in Sheet1 and replace it with the code I gave you.

    HTH

    DominicB

    Edit : According to the image you have posted above, you only have one userform : yada
    Your very first post mentions Yada1 - perhaps why it's not working

+ 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. [SOLVED] Combine multiple sheets onto one sheet
    By Miskondukt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2017, 01:29 PM
  2. [SOLVED] Combine Data from Multiple Sheets into one Sheet
    By billykiller05 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-30-2016, 05:14 PM
  3. Replies: 0
    Last Post: 10-12-2015, 10:02 AM
  4. Combine multiple sheets into one sheet
    By cherryab888 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2015, 05:57 PM
  5. [SOLVED] align or combine multiple columns from multiple sheets into one sheet in sequence
    By calif in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2013, 11:49 AM
  6. combine counts from multiple sheets to one sheet
    By flyguyph in forum Excel General
    Replies: 2
    Last Post: 12-13-2010, 04:08 PM
  7. [SOLVED] Combine multiple sheets into one sheet?
    By Blueluck in forum Excel General
    Replies: 2
    Last Post: 06-08-2005, 11:05 AM

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