Code to rewrite existing code

Maagaard

Board Regular
Joined
Apr 16, 2013
Messages
70
Hi,

I have a series of workbooks, where I need to find an excisting macro and rewrite it.

Is this possible and how can I do it?

Thank you in advance!

Maagaard
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

goesr

Well-known Member
Joined
Nov 15, 2013
Messages
672
Hi Maagaard - To find an existing macro, simply open all workbooks that have the .xlsm extension. Those are the ones that can contain macros. Then press Alt + F11 to open the VBA editor. The macros will be listed. Once you find the macro, we can work on the rewrite as necessary.

Hope this helps.

Happy Excelling,

goesr
 

Maagaard

Board Regular
Joined
Apr 16, 2013
Messages
70
Hi Maagaard - To find an existing macro, simply open all workbooks that have the .xlsm extension. Those are the ones that can contain macros. Then press Alt + F11 to open the VBA editor. The macros will be listed. Once you find the macro, we can work on the rewrite as necessary.

Hope this helps.

Happy Excelling,

goesr

Thanks for your reply! However, I think you misunderstood me. What I need is to write a macro, that can find a specific sub in another workbook and rewrite it.

Part of my job is to keep different macros updated, and my predecessor wrote some code that gets "confused" about dates, when a new year starts. This macro is copied around 60 times into different versions. So instead of me manually changing the code, I want to write a code that can go through all xlsm files and rewrite it. Is that even possible?
 

Forum statistics

Threads
1,136,354
Messages
5,675,296
Members
419,559
Latest member
BraytonM

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