Thread
:
Delete a macro with a macro
View Single Post
#
5
Posted to microsoft.public.excel.programming
Gary L Brown
external usenet poster
Posts: 219
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
Reply With Quote
Gary L Brown
View Public Profile
Find all posts by Gary L Brown