![]() |
Automatically Delete WorkBook 2 modules by using Workbook 1 module
Hi All,
I have still cannot get it right after some advice from Norman and other experts. I would like to write a macro and put it in Workbook 1. This macro in workbook 1 will help mi to delete all the modules in Workbook 2. Eg. Workbook 2 modules are 1) "A_SortData", 2) "B_CreateMonthlyYield" So what can anybody tell me what to write for the macro to place in workbook 1 to delete the 2 modules stated above in workbook 2??? |
Automatically Delete WorkBook 2 modules by using Workbook 1 module
Did Norman or others point you to Chip Pearson's site:
http://www.cpearson.com/excel/vbe.htm Chip has lots of sample code and tips there. ddiicc wrote: Hi All, I have still cannot get it right after some advice from Norman and other experts. I would like to write a macro and put it in Workbook 1. This macro in workbook 1 will help mi to delete all the modules in Workbook 2. Eg. Workbook 2 modules are 1) "A_SortData", 2) "B_CreateMonthlyYield" So what can anybody tell me what to write for the macro to place in workbook 1 to delete the 2 modules stated above in workbook 2??? -- Dave Peterson |
Automatically Delete WorkBook 2 modules by using Workbook 1 mo
Hi Dave,
Yes Norman point me to the website, I try but an error occur on the VBComponent Definition Tony "Dave Peterson" wrote: Did Norman or others point you to Chip Pearson's site: http://www.cpearson.com/excel/vbe.htm Chip has lots of sample code and tips there. ddiicc wrote: Hi All, I have still cannot get it right after some advice from Norman and other experts. I would like to write a macro and put it in Workbook 1. This macro in workbook 1 will help mi to delete all the modules in Workbook 2. Eg. Workbook 2 modules are 1) "A_SortData", 2) "B_CreateMonthlyYield" So what can anybody tell me what to write for the macro to place in workbook 1 to delete the 2 modules stated above in workbook 2??? -- Dave Peterson |
Automatically Delete WorkBook 2 modules by using Workbook 1 mo
Did you set the reference to the VBA Extensibility library. Tools
References check "Microsoft Visual Basic For Applications Extensibility" in Excel 97 or "Microsoft Visual Basic For Applications Extensibility 5.3" in Excel 2000 or later. "ddiicc" wrote: Hi Dave, Yes Norman point me to the website, I try but an error occur on the VBComponent Definition Tony "Dave Peterson" wrote: Did Norman or others point you to Chip Pearson's site: http://www.cpearson.com/excel/vbe.htm Chip has lots of sample code and tips there. ddiicc wrote: Hi All, I have still cannot get it right after some advice from Norman and other experts. I would like to write a macro and put it in Workbook 1. This macro in workbook 1 will help mi to delete all the modules in Workbook 2. Eg. Workbook 2 modules are 1) "A_SortData", 2) "B_CreateMonthlyYield" So what can anybody tell me what to write for the macro to place in workbook 1 to delete the 2 modules stated above in workbook 2??? -- Dave Peterson |
Automatically Delete WorkBook 2 modules by using Workbook 1 mo
Hi Rowan,
Nope, How to set it? What does it do or help or stand for? "Rowan" wrote: Did you set the reference to the VBA Extensibility library. Tools References check "Microsoft Visual Basic For Applications Extensibility" in Excel 97 or "Microsoft Visual Basic For Applications Extensibility 5.3" in Excel 2000 or later. "ddiicc" wrote: Hi Dave, Yes Norman point me to the website, I try but an error occur on the VBComponent Definition Tony "Dave Peterson" wrote: Did Norman or others point you to Chip Pearson's site: http://www.cpearson.com/excel/vbe.htm Chip has lots of sample code and tips there. ddiicc wrote: Hi All, I have still cannot get it right after some advice from Norman and other experts. I would like to write a macro and put it in Workbook 1. This macro in workbook 1 will help mi to delete all the modules in Workbook 2. Eg. Workbook 2 modules are 1) "A_SortData", 2) "B_CreateMonthlyYield" So what can anybody tell me what to write for the macro to place in workbook 1 to delete the 2 modules stated above in workbook 2??? -- Dave Peterson |
Automatically Delete WorkBook 2 modules by using Workbook 1 mo
You need to set a reference to the Extensibility library. In VBA,
go to the Tools menu, choose References, and scroll down to "Microsoft Visual Basic For Applications Extensibility Library". Check this entry in the list. This library defines all the data types used in the VBA object model, such as VBComponent. Without a reference to the library, VBA doesn't know what a VBComponent is, and can't compile the code. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "ddiicc" wrote in message ... Hi Rowan, Nope, How to set it? What does it do or help or stand for? "Rowan" wrote: Did you set the reference to the VBA Extensibility library. Tools References check "Microsoft Visual Basic For Applications Extensibility" in Excel 97 or "Microsoft Visual Basic For Applications Extensibility 5.3" in Excel 2000 or later. "ddiicc" wrote: Hi Dave, Yes Norman point me to the website, I try but an error occur on the VBComponent Definition Tony "Dave Peterson" wrote: Did Norman or others point you to Chip Pearson's site: http://www.cpearson.com/excel/vbe.htm Chip has lots of sample code and tips there. ddiicc wrote: Hi All, I have still cannot get it right after some advice from Norman and other experts. I would like to write a macro and put it in Workbook 1. This macro in workbook 1 will help mi to delete all the modules in Workbook 2. Eg. Workbook 2 modules are 1) "A_SortData", 2) "B_CreateMonthlyYield" So what can anybody tell me what to write for the macro to place in workbook 1 to delete the 2 modules stated above in workbook 2??? -- Dave Peterson |
All times are GMT +1. The time now is 06:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com