Consulting

Results 1 to 4 of 4

Thread: Macro to update macro buttons

  1. #1
    VBAX Regular
    Joined
    Dec 2015
    Posts
    57
    Location

    Macro to update macro buttons

    I have sheet 2 (called "Budget") with macro buttons that is copy pasted into another sheet. I then need to take that new sheet and move it out into a new workbook. It may stay as a solo sheet workbook or become part of multi sheet workbook as I add more sheets. Regardless I am trying to have the macros from the original sheet 2 (called "Budget") go with the newly created sheet and have the buttons assigned work. They are still pointing to sheet 2.

    I need each sheet as a stand alone self sustained sheet being able to run the macros for that sheet only. I cannot figure out how to move the macros from sheet 2 (called "Budget") into the new sheet(s) and subsequently workbook(s) and am having the macros move too (with the buttons working that would point to the new sheet not sheet 2.)

    I guess I am trying to create a macro to adjust the macro buttons in the newly created sheet(s) to pull from that sheet's macros only. My macros I want copied over are simple copy paste value and filter macros (there are 4 macros but I have about 50 sheets I need to do this for).

    I am fairly new to VBA so please excuse any dotart-ness.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I'm guessing you are using Form buttons. Try using ActiveX buttons where the code is included in the Worksheet Module.
    Attached Files Attached Files
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Regular
    Joined
    Dec 2015
    Posts
    57
    Location
    Thank you, I am using form buttons. I will attempt Active X buttons as you suggest. Its probably that simple, thank you quick reply. I will confirm if it works later today so we can mark this thread as solved.

  4. #4
    VBAX Regular
    Joined
    Dec 2015
    Posts
    57
    Location
    Quote Originally Posted by mdmackillop View Post
    I'm guessing you are using Form buttons. Try using ActiveX buttons where the code is included in the Worksheet Module.

    I used active x toggle button and it worked perfectly for what I needed to do. Thank you for recommendation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •