Running a Macro on external non-macro enabled workbook

rudolfweyers

New Member
Joined
Nov 22, 2021
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Good day

I currently have 2 workbooks where workbook A pulls info from workbook B. I need to run a macro on workbook B to convert info on there in order for it to be usable. The info on workbook B gets generated externally, so every time it deletes the workbook and creates a new one, therefore permanently enabling macros won't work.

So I would like to have a way where either of the following options would work
1. Open workbook A, which can be macro enabled, and have it run a macro on workbook B automatically
2. Open workbook A, open workbook B automatically, and run the macro from within A on B

Is this possible?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Yes it is. A macro in one workbook can manipulate another workbook. If you need it to run automatically when workbook A opens, either call the macro auto_open and put it in a normal module in workbook A, or use the Workbook_Open event in the ThisWorkbook module of workbook A.
 
Upvote 0
Yes it is. A macro in one workbook can manipulate another workbook. If you need it to run automatically when workbook A opens, either call the macro auto_open and put it in a normal module in workbook A, or use the Workbook_Open event in the ThisWorkbook module of workbook A.
Thanks, I will go have a look if I can figure it out. I'm very new to writing macros
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,922
Members
449,056
Latest member
denissimo

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
Back
Top