+ Reply to Thread
Results 1 to 2 of 2

Remove active module in a copy

  1. #1
    Mehrdad Hakimzadeh
    Guest

    Remove active module in a copy

    I have a workbook with one module and i want to save a copy of workbook
    without this module. Plaese help me to write codes to do this automaticaly.

    Thanks
    Mehrdad Hakimzadeh

  2. #2
    Bob Phillips
    Guest

    Re: Remove active module in a copy

    Here's a function

    '----------------------------------------------------------------
    Function DeleteModule(moduleName As String)
    '----------------------------------------------------------------
    Dim vbMod As Object

    Set vbMod = ActiveWorkbook.VBProject.VBComponents(moduleName)
    ThisWorkbook.VBProject.VBComponents.Remove vbMod

    End Function


    --

    HTH

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


    "Mehrdad Hakimzadeh" <Mehrdad [email protected]> wrote in
    message news:[email protected]...
    > I have a workbook with one module and i want to save a copy of workbook
    > without this module. Plaese help me to write codes to do this

    automaticaly.
    >
    > Thanks
    > Mehrdad Hakimzadeh




+ Reply to Thread

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