Good morning Paul,
        Thank you for taking interest in my issue – I really appreciate it!
To answer your questions:

1)      Yes, ideally I would like to disable the macro permanently and then
be able to save the disabled version. Having said that, if it is much
easier to complete the task by leaving the macro in place, then I can
work around that.
2)      I am using MS Excel 2003 to create the template.

Any advice you can provide will be of huge assistance – thank you!


On Sep 19, 4:10 pm, Paul Schreiner <schreiner_p...@att.net> wrote:
> Are you wanting to disable the macros "permanently" and save the  file?
> or are you just needing them disabled so you can extract the information you
> need?
>
> If you just need them deactivated temporarily,
> you can create a macro that issues:
> Application.enableevents = false
>
> then, open each of the 20,000 workbooks,
> do whatever needs done,
> close the workbook.
>
> If you're wanting to REMOVE the macros from the workbook.
> That gets a little trickier.
>
> What version of Excel are you using?
> There may be some options there (like saving as .xlsx, which would remove all
> macros)
>  
> Paul
> -----------------------------------------
> “Do all the good you can,
> By all the means you can,
> In all the ways you can,
> In all the places you can,
> At all the times you can,
> To all the people you can,
> As long as ever you can.” - John Wesley
> -----------------------------------------
>
> ________________________________
> From: HarryP Knuckles <kent.bouc...@tbs-sct.gc.ca>
> To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com>
> Sent: Mon, September 19, 2011 3:58:32 PM
> Subject: $$Excel-Macros$$ Template to modify workbooks
>
> Good afternoon,
>
> I have 20,000 workbooks that are going to be returned to me shortly
> and i need a template from which i can open the workbooks
> (individually) and have a marco to perform three necessary functions
> on all of these workbooks (each workbook will have a unique name). My
> objective is to:
>
> 1) Unprotect the workbooks.
> 2) Unprotect the worksheets.
> 3) Disable a macro that is in each of the original workbooks (20,000)
> designed to prevent right click, cut, copy and paste.
>
> I have included below the macro that is present in all 20,000
> workbooks that i need to have diabled through the new template
> workbook. Can you folks provide some guidance as to how i can
> complete
> this task using a template.
> Your help is greatly appreciated!!!
> ___________________________________________________________________________­­
> ________________
>
> Private Sub Workbook_Activate()
> Application.CutCopyMode = False
> Application.OnKey "^c", ""
> Application.CellDragAndDrop = False
> Application.CommandBars("Ply").Controls("View Code").Enabled = False
> End Sub
>
> Private Sub Workbook_Deactivate()
> Application.CellDragAndDrop = True
> Application.OnKey "^c"
> Application.CutCopyMode = False
> End Sub
>
> Private Sub Workbook_WindowActivate(ByVal Wn As Window)
> Application.CutCopyMode = False
> Application.OnKey "^c", ""
> Application.CellDragAndDrop = False
> End Sub
>
> Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
> Application.CellDragAndDrop = True
> Application.OnKey "^c"
> Application.CutCopyMode = False
> End Sub
>
> Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
> Target As Range, Cancel As Boolean)
> Cancel = True
> MsgBox "Right click menu deactivated." & vbCrLf & _
> "Cannot copy or ''drag & drop''.", 16, "For this workbook:"
> End Sub
>
> Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
> Target As Range)
> Application.CutCopyMode = False
> End Sub
>
> Private Sub Workbook_SheetActivate(ByVal Sh As Object)
> Application.OnKey "^c", ""
> Application.CellDragAndDrop = False
> Application.CutCopyMode = False
> End Sub
>
> Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
> Application.CutCopyMode = False
> End Sub
>
> --
> ---------------------------------------------------------------------------­-------
>
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links 
> :http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials athttp://www.excel-macros.blogspot.com
> 4. Learn VBA Macros athttp://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below 
> linkhttp://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to