+ Reply to Thread
Results 1 to 7 of 7

Need one copy function that can work on multiple copy buttons and multiple sheets

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Need one copy function that can work on multiple copy buttons and multiple sheets

    I need one copy function (Macro) that can work on multiple copy buttons and multiple sheets.

    I am a total beginner but instantly fell in love with VBA. I am reading a ton of forum material on IF’s and Dim’s but I can’t quite make out how exactly to use them in my case. I must have tried a million versions of both in the last month. Please help.

    Please show me how it would work.
    Last edited by D_Step; 12-03-2012 at 08:35 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need one copy function that can work on multiple copy buttons and multiple sheets

    You can put this macro into a regular code module so it's visible to all buttons on all sheets, then attach it to your copy buttons.


    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,493

    Re: Need one copy function that can work on multiple copy buttons and multiple sheets

    If you select the cell that has the words "Region:"
    Then run this macro
    Please Login or Register  to view this content.
    This should work for any sheet.

  4. #4
    Registered User
    Join Date
    11-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need one copy function that can work on multiple copy buttons and multiple sheets

    Thank you. It will take me some time but I will wrap my mind around it. Thank you so much it works amazingly.
    Last edited by D_Step; 12-03-2012 at 08:32 PM.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need one copy function that can work on multiple copy buttons and multiple sheets

    Hopefully the included comments will help clarify what is happening.

  6. #6
    Registered User
    Join Date
    11-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need one copy function that can work on multiple copy buttons and multiple sheets

    Quote Originally Posted by JBeaucaire View Post
    Hopefully the included comments will help clarify what is happening.
    Sorry to bug you again. The formula works perfectly, seriously it’s amazing, you’re amazing, thank you so much. I forgot about two things though; one I need the copied section to be cleared after it’s been copied as the work sheet stays protected. How to clear the section that was copied and protect the sheet again. Would you be able to help me out with that.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need one copy function that can work on multiple copy buttons and multiple sheets

    Please Login or Register  to view this content.

    This should get you close, you can experiment with the lines demonstrated, add more if needed to get the results needed.

+ 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