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: 87
Default How to Remove Code

Hi everyone

I recieved some great assistance on a project I'm working on just recently,
and I'm 99% done.

As I do a backup of each day, I insert the date into the File.Name so that
others in the office can access it and do their respective thing with the
information enclosed the following day.

What they don't need to see, or have access to is the code attached to it,
both in "ThisWorkbook" & "Modules".

I read a thread a while ago that explained how to do it, but I didn't think
it important at the time so I dismissed it...Go Figure...!

That said.!

Attached to [ALT-F11] - ThisWorkbook is 2 Subs:

Start_Timer() & Stop_Timer() + there is 7 Modules also attached with a
variety of Subs & Functions

Ideally, I would like for all of it to disappear, though I would still be
happy if it was just the Sub Start_Timer() code that is removed as it is
triggered when the Workbook opens, this represents a major inconvenience and
annoyance to those who do not require it, or know how & where to switch the
timer off.

So something like:

AllModules.Select
Selection.Delete, "AllModules", Save = vbNo
AllVBACode.Select
Selection.Delete, "AllVBA"
Application.Compile, Save = vbYes

....Pause

Lastly, is it possible to insert something like the following to clean up
the sheet just prior to closing

On_Close()

' This section contains CmdBtns that will be rendered useless and require
removal leaving only a Header Row.

Rows("1:3").select
Selection.Delete Shift:=xlUp
With Workbook
..Save
..close
End With

TIA
Mick



 
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
Remove VBA code [email protected] Excel Programming 1 September 26th 07 08:20 AM
Remove / Add code through VBA Sharad Naik Excel Programming 2 December 29th 04 01:16 PM
VBA Code to remove VBA Cory Thomas[_6_] Excel Programming 3 June 9th 04 04:06 PM
Use VB code to remove code in sheet1 WashoeJeff Excel Programming 4 January 25th 04 12:23 AM
Remove VBA code Michi[_2_] Excel Programming 3 January 21st 04 04:18 PM


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