Results 1 to 11 of 11

deleting worksheets from a file which has macros in it........does not work.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    deleting worksheets from a file which has macros in it........does not work.

    Hi,

    I have this macro and i save a copy of this file (along with all its worksheets) to a specified location.

    I do this so that i can then reopen the file and use all of the VBA code that is located in the "ThisWorkBook" module and some of the VBA code in one of the worksheet modules.

    So i open this copied file......i begin to delete the worksheets i dont need........and the macro will delete the first worksheet but then it will just STOP.



    NOTE: iF I run the macro such that you have the VBA code open then when i open the copied file i get a question about "enabling" the macros. When ever i get asked this question.....the macro will run as its supposed to ......

    I am enclosing the macro. When you click launch what is supposed to happen is that all of the sheets in the workbook except the worksheet named "Prompt" and the worksheet named "Four col sht" are to be deteled.........but this does not happen.

    It will only happen provided you have the VBA code open and you get a question asking about enabling / disabling the macro for the "copied" file.

    Any ideas?
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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