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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

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