Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Delete a macro with a macro

Hi All.........
I need the code, if someone pleases, on how to delete or disable my

Private Sub Workbook_Open() macro

TIA
Vaya con Dios,
Chuck, CABGx3


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Delete a macro with a macro

Hi Chuck,

See Chip Pearson at:

http://www.cpearson.com/excel/vbe.htm

See particularly the section entitled:

'Deleting A Procedure From A Module '



---
Regards,
Norman



"CLR" wrote in message
...
Hi All.........
I need the code, if someone pleases, on how to delete or disable my

Private Sub Workbook_Open() macro

TIA
Vaya con Dios,
Chuck, CABGx3




  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Delete a macro with a macro

Thank you kind Sir.............

Vaya con Dios,
Chuck, CABGx3



"Norman Jones" wrote:

Hi Chuck,

See Chip Pearson at:

http://www.cpearson.com/excel/vbe.htm

See particularly the section entitled:

'Deleting A Procedure From A Module '



---
Regards,
Norman



"CLR" wrote in message
...
Hi All.........
I need the code, if someone pleases, on how to delete or disable my

Private Sub Workbook_Open() macro

TIA
Vaya con Dios,
Chuck, CABGx3





  #4   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Delete a macro with a macro

A couple of issues.........
1- Chips procedures require setting a reference to the "Microsoft Visual
Basic for Applications Extensibility" library......(not the 5.3
version)......I do not have that option showing.......I tried the 5.3 one
which I do have, and it worked sometimes but would not stay checked through a
save and re-open. Is this a MIS "rights" and/or not everything installed
thing?

2- Assuming I do get the proper library checked, does that mean that
everyone who uses this file will have to do the same thing?......if so, can
it be done programatically, within this file?


TIA
Vaya con Dios,
Chuck, CABGx3



"Norman Jones" wrote:

Hi Chuck,

See Chip Pearson at:

http://www.cpearson.com/excel/vbe.htm

See particularly the section entitled:

'Deleting A Procedure From A Module '



---
Regards,
Norman



"CLR" wrote in message
...
Hi All.........
I need the code, if someone pleases, on how to delete or disable my

Private Sub Workbook_Open() macro

TIA
Vaya con Dios,
Chuck, CABGx3





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default Delete a macro with a macro

Hi Chuck,
Chip does it the right way but John Walkenbach has also suggested another
way precisely because of the "does that mean that everyone who uses this file
will have to do the same thing?" issue.
If you declare your variables as Object, Excel will figure out what kind
of object it is at run time. So, EXAMPLE: instead of declaring...
Dim cmThisWorkbook as CodeModule
try
Dim cmThisWorkbook as Object

etc, etc, etc...

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"CLR" wrote:

A couple of issues.........
1- Chips procedures require setting a reference to the "Microsoft Visual
Basic for Applications Extensibility" library......(not the 5.3
version)......I do not have that option showing.......I tried the 5.3 one
which I do have, and it worked sometimes but would not stay checked through a
save and re-open. Is this a MIS "rights" and/or not everything installed
thing?

2- Assuming I do get the proper library checked, does that mean that
everyone who uses this file will have to do the same thing?......if so, can
it be done programatically, within this file?


TIA
Vaya con Dios,
Chuck, CABGx3



"Norman Jones" wrote:

Hi Chuck,

See Chip Pearson at:

http://www.cpearson.com/excel/vbe.htm

See particularly the section entitled:

'Deleting A Procedure From A Module '



---
Regards,
Norman



"CLR" wrote in message
...
Hi All.........
I need the code, if someone pleases, on how to delete or disable my

Private Sub Workbook_Open() macro

TIA
Vaya con Dios,
Chuck, CABGx3







  #6   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Delete a macro with a macro

Thanks Gary.......
I'll try that tomorrow........it's wuitting time in St. Petersburg, Fla.
I beat my current requirement by wrapping my Workbook_Open macro in an IF
statement and changing one cell in the new file.....just keeping the
Workbook_Open in both, but it performs differently in each because of the
changed cell...........not proper, but I was in a hurry..........I still want
to know how to "do it right" tho.......


Vaya con Dios,
Chuck, CABGx3




"Gary L Brown" wrote:

Hi Chuck,
Chip does it the right way but John Walkenbach has also suggested another
way precisely because of the "does that mean that everyone who uses this file
will have to do the same thing?" issue.
If you declare your variables as Object, Excel will figure out what kind
of object it is at run time. So, EXAMPLE: instead of declaring...
Dim cmThisWorkbook as CodeModule
try
Dim cmThisWorkbook as Object

etc, etc, etc...

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"CLR" wrote:

A couple of issues.........
1- Chips procedures require setting a reference to the "Microsoft Visual
Basic for Applications Extensibility" library......(not the 5.3
version)......I do not have that option showing.......I tried the 5.3 one
which I do have, and it worked sometimes but would not stay checked through a
save and re-open. Is this a MIS "rights" and/or not everything installed
thing?

2- Assuming I do get the proper library checked, does that mean that
everyone who uses this file will have to do the same thing?......if so, can
it be done programatically, within this file?


TIA
Vaya con Dios,
Chuck, CABGx3



"Norman Jones" wrote:

Hi Chuck,

See Chip Pearson at:

http://www.cpearson.com/excel/vbe.htm

See particularly the section entitled:

'Deleting A Procedure From A Module '



---
Regards,
Norman



"CLR" wrote in message
...
Hi All.........
I need the code, if someone pleases, on how to delete or disable my

Private Sub Workbook_Open() macro

TIA
Vaya con Dios,
Chuck, CABGx3





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
Macro warning - how to delete macro GavinS Excel Worksheet Functions 3 April 1st 09 01:45 PM
delete a macro that isn't in macro list Jane Makinson Excel Discussion (Misc queries) 3 March 13th 06 01:10 PM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 1 June 22nd 05 01:12 AM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 05:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM


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

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

About Us

"It's about Microsoft Excel"