ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete Code (https://www.excelbanter.com/excel-programming/352789-delete-code.html)

Libby

Delete Code
 
Hi Guys,

How can I delete the code in one workbook from another workbook.

Take two workbooks A & B

Workbook A has lots of code and modules and is protected with a project
password (which I know).

I want workbook B to be able to access the vba project in workbook A and
delete all vba modules and code. Any ideas?

many Thanks L




Jim Thomlinson[_5_]

Delete Code
 
If the code is protected then you are hooped. Otherwise you need to get a
reference to the target workbook something like

dim wbk as workbook

set wbk = workbooks("MyBook.xls")

after that you can use the code that is refered to here...
http://www.cpearson.com/excel/vbe.htm

--
HTH...

Jim Thomlinson


"Libby" wrote:

Hi Guys,

How can I delete the code in one workbook from another workbook.

Take two workbooks A & B

Workbook A has lots of code and modules and is protected with a project
password (which I know).

I want workbook B to be able to access the vba project in workbook A and
delete all vba modules and code. Any ideas?

many Thanks L





All times are GMT +1. The time now is 12:38 AM.

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