ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro location (https://www.excelbanter.com/excel-programming/416495-macro-location.html)

Karen

Macro location
 
I have a macro in a workbook that was emailed with 2 additional workbooks
that need to use this macro. There seems to be a problem when they save the
master as a new name. They still have to bring up last month's spreadsheet to
access the macro. What are the rules for macro location and how can I
simplify this process for my users? Can it also be because they make a new
folder for each period and save the renamed master in it?.
--
Excelsolutions4U

JLGWhiz

Macro location
 
While the code modules are saved to the new workbook along with the data on
the sheets, it can be problematic to run the code for a few reasons.

1. If the code references the name of the original workbook, it will throw
errors for subscript out of bounds.

2. If there are links to cells in the original workbook, then those links
are still there and the new workbook will be looking for those links.

and a few others. What you really need to do is contact the creator of the
workbooks and have them troubleshoot the problem.

"Karen" wrote:

I have a macro in a workbook that was emailed with 2 additional workbooks
that need to use this macro. There seems to be a problem when they save the
master as a new name. They still have to bring up last month's spreadsheet to
access the macro. What are the rules for macro location and how can I
simplify this process for my users? Can it also be because they make a new
folder for each period and save the renamed master in it?.
--
Excelsolutions4U


dustinbrearton via OfficeKB.com

Macro location
 
It is likely because they are changing the name of the file. If the code
contains any statements that refer to the original name of the workbook it
won't work in a new workbook without editing it. Is there a lot of code?
Can you find anything that references the old workbook name? If you can post
that section of code and I am sure that someone will be able to help you with
a better way to code that part.

Karen wrote:
I have a macro in a workbook that was emailed with 2 additional workbooks
that need to use this macro. There seems to be a problem when they save the
master as a new name. They still have to bring up last month's spreadsheet to
access the macro. What are the rules for macro location and how can I
simplify this process for my users? Can it also be because they make a new
folder for each period and save the renamed master in it?.


--
Message posted via http://www.officekb.com


Karen

Macro location
 
I created the macros and audited the contents of all these spreadsheets.
There is no reference to the original sheet name in the macro. Other
spreadsheets are linked to the spreadsheets using the macro (source data
only). The original author is long gone, and it doesn't matter because I had
to do extensive revisions to accommodate a new payroll system. I will go
into the office and try to replicate their problems next week. Thanks for
trying, K

"JLGWhiz" wrote:

While the code modules are saved to the new workbook along with the data on
the sheets, it can be problematic to run the code for a few reasons.

1. If the code references the name of the original workbook, it will throw
errors for subscript out of bounds.

2. If there are links to cells in the original workbook, then those links
are still there and the new workbook will be looking for those links.

and a few others. What you really need to do is contact the creator of the
workbooks and have them troubleshoot the problem.

"Karen" wrote:

I have a macro in a workbook that was emailed with 2 additional workbooks
that need to use this macro. There seems to be a problem when they save the
master as a new name. They still have to bring up last month's spreadsheet to
access the macro. What are the rules for macro location and how can I
simplify this process for my users? Can it also be because they make a new
folder for each period and save the renamed master in it?.
--
Excelsolutions4U


Dave Peterson

Macro location
 
How do you call the macros?

Did you place buttons (or other shapes) on the worksheet and then assign the
macro?

Did you attach a toolbar to the workbook that points at those macros?



Karen wrote:

I have a macro in a workbook that was emailed with 2 additional workbooks
that need to use this macro. There seems to be a problem when they save the
master as a new name. They still have to bring up last month's spreadsheet to
access the macro. What are the rules for macro location and how can I
simplify this process for my users? Can it also be because they make a new
folder for each period and save the renamed master in it?.
--
Excelsolutions4U


--

Dave Peterson


All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com