+ Reply to Thread
Results 1 to 3 of 3

VBA - delete a SUB from Worksheet coding using VBA

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    6

    VBA - delete a SUB from Worksheet coding using VBA

    Hi all,

    I am exporting a copy of a Worksheet (which contains VBA Sub Worksheet_Change and Target_Cell coding) to a separate workbook, but I need to delete the coding from the new workbook using VBA. The following code works for modules and for other subs/macros on the worksheets:
    Please Login or Register  to view this content.
    The code deletes but I am getting a dialog box: cannot enter break mode at this time with the options Continue or End.

    Is there any way to stop this message?

    I have references to VBA extensibility on and trust VBA in security settings.

    Suggestions would be most appreciated. Thanks
    rgs
    Ginny
    Last edited by Ginny2222; 06-21-2016 at 02:51 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA - delete a SUB from Worksheet coding using VBA

    Does this help?

    http://www.ozgrid.com/VBA/delete-sheet-code.htm

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: VBA - delete a SUB from Worksheet coding using VBA

    hi John, thanks for the suggestion. That's a variation on my coding and gives the same outcome, I'm afraid.
    Gimny

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Worksheet Protection Coding Help
    By Excelophobe34 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-30-2014, 11:30 AM
  2. [SOLVED] VBA coding - If Cells.value = 0, then Delete entire row.
    By nobodyNZ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2014, 05:37 AM
  3. command button coding to delete column values
    By mubashar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2014, 02:38 PM
  4. Help with updating Master Worksheet Coding
    By woontime in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2011, 04:58 AM
  5. coding for changing worksheet name
    By mingali in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-29-2009, 10:24 AM
  6. Worksheet Coding
    By XCESIV in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2006, 10:30 AM
  7. Need coding to DELETE a line on a spreadsheet.
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2006, 04:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1