Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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??? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copying modules from one workbook to another workbook | Excel Discussion (Misc queries) | |||
Excel workbook is corrupted, workbook automatically saves on start | Excel Discussion (Misc queries) | |||
Copy VBA Module and Form from Workbook to another workbook | Excel Programming | |||
Copy Modules from One workbook to Active Workbook | Excel Programming | |||
How to Compare Workbook VBA modules | Excel Programming |