Macros Stop Working

drewg

Board Regular
Joined
Jul 5, 2010
Messages
67
Hi board;
An application opens with a dialog that lets the user select a folder to work in, then copies some materials workbooks of one worksheet each and one master workbook that lets users select as many materials as needed and include it in the master workbook. They edit the materials as needed in the master workbook in the project folder, adding new worksheets of materials as needed.
Each materials workbook has navigation buttons referencing macros in Personal that move the cursor around in the materials worksheet.
If i open a materials workbook in a new project folder, the navigation buttons find Personal and the buttons do what they are expected to do.
However.
If I open the master workbook with a copy of the materials worksheets that have been added to master, the navigation buttons on the imported materials worksheets do not work.

My theory is that the materials navigation button macros work because they are aware of the workbook they come from, but when they are copied to the master, they lose their material workbook identity because they are no longer part of the materials workbook, they are now part of the master and the macros are no longer hooked to Personal?
My question is, how can i restore the functionality of the navigation buttons in the materials worksheet once it is imported into the master?

Thanks very much
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
If you were to start a new macro button using assign macro and look at the naming construct, it might show a static path
 

drewg

Board Regular
Joined
Jul 5, 2010
Messages
67
thanks very much for your reply
I will do that and see if I understand what needs to happen to get it to go...I'm guessing i need to use your clue about the static path (its somewhere in either the button macro or in Personal, I'm not sure) and change that path to Application.ThisWorkbook.Path, or maybe Application.ActiveWorkbook.Fullname since, based on observations that it works in the materials but not in the master, it is the name property that is getting clobbered in the copy?
Thanks very much, I will try to figure out where the reference is (in the materials workbooks or in Personal) and look for a static path in the button code to change to one of the above, and hope that gets me home.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,312
Messages
5,600,887
Members
414,414
Latest member
neil_c

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top