Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Adam
 
Posts: n/a
Default Enable/Disable macros

My file still asks if I want to enable or disable macros even though I have
deleted all macros.
Any Ideas?
/Adam
  #2   Report Post  
 
Posts: n/a
Default

Hi Adam,

the reason for this is that although the macros have been
deleted a module folder still exists. In the VB editor
you will see a module folder. Expand this, then right
click on the module shown (probably 'Module1') and
choose 'Remove..'. Click 'No' in the next dialog and
Save. You won't see the macro dialog when you re-open the
file.

Regards,

TonyM
-----Original Message-----
My file still asks if I want to enable or disable macros

even though I have
deleted all macros.
Any Ideas?
/Adam
.

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Adam,

You could run this code on the workbook

Dim vbMod As Object

For Each vbMod In ActiveWorkbook.VBProject.VBComponents
Select Case vbMod.Type
Case 1, 2, 3: 'module, class, userform
ThisWorkbook.VBProject.VBComponents.remove vbMod
Case Else 'ThisWorkbook, sheet modules
With vbMod.CodeModule
.DeleteLines 1, .CountOfLines
End With
End Select
Next vbMod

Make sure that you don't leave it in the workbook though :-)

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
...
Hi Adam,

the reason for this is that although the macros have been
deleted a module folder still exists. In the VB editor
you will see a module folder. Expand this, then right
click on the module shown (probably 'Module1') and
choose 'Remove..'. Click 'No' in the next dialog and
Save. You won't see the macro dialog when you re-open the
file.

Regards,

TonyM
-----Original Message-----
My file still asks if I want to enable or disable macros

even though I have
deleted all macros.
Any Ideas?
/Adam
.



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
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
sorting with macros Sorting in macros Excel Discussion (Misc queries) 1 February 1st 05 09:02 AM
Enable/Disable Macros Ben Schaum Excel Discussion (Misc queries) 1 January 21st 05 03:42 PM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM
Macros disappear after a file is imported Brent E Excel Discussion (Misc queries) 1 December 18th 04 12:25 AM


All times are GMT +1. The time now is 12:23 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"