ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to replace another macro (https://www.excelbanter.com/excel-programming/350185-macro-replace-another-macro.html)

Excelerate-nl

Macro to replace another macro
 
Is there a way to replace an existing (protected) macro-project from a sheet
by a new macro, using another macro? The idea is to replace a macro from a
sheet that is used on a remote computer. I would like to send the user a
sheet with macro that can replace the old macro by a new one.

Thanks in advance
Jan Bart

Norman Jones

Macro to replace another macro
 
Hi Jan,

See Chip Pearson's page on programming to the VBE at:

http://www.cpearson.com/excel/vbe.htm

However, I think that the use of the techniques described by Chip would
require that the project be unprotected.


---
Regards,
Norman


"Excelerate-nl" wrote in message
...
Is there a way to replace an existing (protected) macro-project from a
sheet
by a new macro, using another macro? The idea is to replace a macro from a
sheet that is used on a remote computer. I would like to send the user a
sheet with macro that can replace the old macro by a new one.

Thanks in advance
Jan Bart




Bob Phillips[_6_]

Macro to replace another macro
 
Unprotect a VBA project in code is flaky, it requires Sendkeys. Not good.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Excelerate-nl" wrote in message
...
Is there a way to replace an existing (protected) macro-project from a

sheet
by a new macro, using another macro? The idea is to replace a macro from a
sheet that is used on a remote computer. I would like to send the user a
sheet with macro that can replace the old macro by a new one.

Thanks in advance
Jan Bart





All times are GMT +1. The time now is 09:43 PM.

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