0

I am trying to write a macro in an excel file, that can access another excel file where the "real" code is. So the excel file with the original macro code will be updated from time to time and I want the other excel file to always get access to the updated code while running a macro. Does anybody know how to write a macro, that can access the vba code of another file? I am a beginner in vba and don't really know where to start… Thank you! :)

braX
  • 11,506
  • 5
  • 20
  • 33
  • Sounds like you need to be using an Excel Add-In (XLAM file) instead, because VBA does not work the way you think it does. – braX Jul 07 '20 at 08:46
  • Yes it is possible but what kind of access are you talking about... You want to run the code or Read/Modify the code? If you could explain exactly what you are trying to achive? – Siddharth Rout Jul 07 '20 at 09:05
  • It looks a little like this question: [https://stackoverflow.com/questions/34211496/run-a-macro-from-another-workbook](https://stackoverflow.com/questions/34211496/run-a-macro-from-another-workbook) Best Matthias – Matthias Fuglsang-Damgaard Jul 07 '20 at 09:40
  • So there is a "Master" file that has the Code for the macros, that you should be able to run from other Excel files. And because the macros get updated or Bugs get fixed, the Code in the Master file changes and those changes should also apply when you run the macros from the other Excel files. This is what I mean by "Access another Excel file"... hope that clearifies what i the problem is :) – Waynegard Jul 07 '20 at 11:25

0 Answers0