Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying modules from one workbook to another workbook Vinod[_2_] Excel Discussion (Misc queries) 3 September 19th 08 06:18 PM
Excel workbook is corrupted, workbook automatically saves on start Paul Gooda Excel Discussion (Misc queries) 3 September 28th 06 04:51 PM
Copy VBA Module and Form from Workbook to another workbook topaiva Excel Programming 1 November 25th 04 03:47 PM
Copy Modules from One workbook to Active Workbook Jim Gifford Excel Programming 1 November 18th 03 12:30 PM
How to Compare Workbook VBA modules Dan[_26_] Excel Programming 2 October 16th 03 12:59 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"