PDA

View Full Version : [SOLVED] Macro to update macro buttons



SteveM99
09-28-2017, 07:39 AM
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.

mdmackillop
09-28-2017, 07:49 AM
I'm guessing you are using Form buttons. Try using ActiveX buttons where the code is included in the Worksheet Module.

SteveM99
09-28-2017, 08:33 AM
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.

SteveM99
10-01-2017, 03:39 PM
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.