#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default 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



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
Delete code chrisnsmith Excel Discussion (Misc queries) 4 March 8th 09 01:10 AM
Code to delete a Line in a another code helmekki[_88_] Excel Programming 1 August 8th 05 01:14 AM
delete code needed Rick Excel Programming 2 September 21st 04 07:39 PM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Excel Programming 0 January 27th 04 07:07 AM
VBA code to delete VBA code in another Workbook Chip Pearson Excel Programming 0 September 15th 03 03:54 PM


All times are GMT +1. The time now is 10:35 PM.

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"