LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Removing macros using VBA

As the web page states at the top, you need to create a reference to the
Microsoft Visual Basic Extensibility Library.

--
Regards,
Tom Ogilvy

"jgranda" wrote in message
...
I am using the code from the pearson website but there is a case of user
error - me.

I am receiving the following error message:
"Compile error: User-defined type not defined"

The code I am using is:
Sub DeleteModule()
Dim VBComp As VBComponent
Set VBComp = ThisWorkbook.VBProject.VBComponents("Module1")
ThisWorkbook.VBProject.VBComponents.Remove VBComp
End Sub

When I run the debugger, it is highlighting the line Dim VBComp As
VBComponent.

Can someone give me advice on how to correct?

Thanks,

Joe



 
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
Removing Macros Erin Excel Worksheet Functions 4 January 13th 10 01:18 PM
Removing macros from workbook Darrell Excel Discussion (Misc queries) 1 October 4th 05 03:56 AM
Removing macros using VBA Norman Jones Excel Programming 3 September 1st 04 10:06 PM
Removing macros using VBA Frank Kabel Excel Programming 0 September 1st 04 05:07 PM
Removing Macros tina Excel Programming 2 June 21st 04 08:14 PM


All times are GMT +1. The time now is 05:44 PM.

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"