Imported Macro to New Workbook still connected to Template
I am not a programmer but have been given the task to try to record a macro for our company's bonus and merit process. I created a template that would go to all HR locations, domestic and overseas, to format their downloads that occur from two different systems. I've used the macro recorder and modified the code where I could to make it work. But the macro buttons I create on their download sheet (MERIT) remain connected to the Template in order to work.
In the macro I export 3 modules from the Template, select the download sheet (which is the second tab in the template file), and do a copy to a new workbook, then import the 3 modules, which does work. But once the Template is closed, and the MERIT sheet is sent to someone who does not have the Template file, the macro buttons fail as they are looking for the Template file to work. Not sure if the problem is the way I exported and imported the modules, or how the buttons were assigned. Below is the code that recorded to export macros, copy MERIT to new workbook, import macros, and assign first button. Can anyone steer me in the right direction?
Application.CommandBars("Forms").Visible = True
ActiveSheet.Buttons.Add(3957.75, 108.75, 79, 30).Select
Selection.OnAction = "BonusColumnSort"
Selection.Characters.Text = "Bonus" & Chr(10) & "Column Sort"
With Selection.Characters(Start:=1, Length:=17).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic