+ Reply to Thread
Results 1 to 5 of 5

Copy a sheet from xlsm to a new workbook result "module not find" error

Hybrid View

  1. #1
    Registered User
    Join Date
    06-29-2015
    Location
    Hong Kong
    MS-Off Ver
    2013
    Posts
    3

    Copy a sheet from xlsm to a new workbook result "module not find" error

    Greeting!

    Like the title said how to solve this problem?
    Current I am using Excel 2013, and I have this problem even when I do the copy manually.

    I really need help as I searched the internet for a long time with no result and this problem is really hindering my work!

    Much thanks!

  2. #2
    Registered User
    Join Date
    03-08-2014
    Location
    United Kingdom
    MS-Off Ver
    Office 2010, Office 2013 & Office 2016 / 365
    Posts
    23

    Re: Copy a sheet from xlsm to a new workbook result "module not find" error

    Hello,

    It is hard to tell what is causing the problem without seeing the workbook. But the "module not found" error suggests that the sheet contains references to a macro or other function (as it is from a macro enabled workbook). To eliminate this you either need to copy the macro/vba or just copy and paste values and then copy the source formatting. This will remove any links to a macro or other function.

    Adam

  3. #3
    Registered User
    Join Date
    06-29-2015
    Location
    Hong Kong
    MS-Off Ver
    2013
    Posts
    3

    Re: Copy a sheet from xlsm to a new workbook result "module not find" error

    Hi

    Thanks Adam, but it does not solve my problem.

    Basically even when I do a simple macro recording to a workbook and save them as xlsm, I can't have one of it sheet copy to a new workbook.
    Only copy and value of the sheet doesn't work in my situation because the file I am trying to copy is a invoice contain header and other and other setting (which can be copy in new book if the original workbook does not have macro).

    I really need a method to by pass this "module not find" problem, it seem that xlsm from other create can allow copy of a sheet to a new workbook without such error occur, pls help!

  4. #4
    Registered User
    Join Date
    03-08-2014
    Location
    United Kingdom
    MS-Off Ver
    Office 2010, Office 2013 & Office 2016 / 365
    Posts
    23

    Re: Copy a sheet from xlsm to a new workbook result "module not find" error

    Ok, the "module not found" error is caused by a missing macro.

    Now here is a macro/vba code which will copy a sheet and paste it into a new workbook:

    Sub copysheet()
         
        Application.DisplayAlerts = False
    
        Sheets("Sheet1").UsedRange.Copy
        
        Workbooks.Add
    
        ActiveSheet.Cells(1, 1).PasteSpecial xlPasteAll
    
        Application.CutCopyMode = False
    
        Application.DisplayAlerts = True
    
    End Sub
    Just change the first "Sheet1" to the sheet name that you are copying - this should by pass the module not found error

    If you just need values and no formulas or formatting change xlPasteAll to xlPasteValues

    Thanks,

    Adam

  5. #5
    Registered User
    Join Date
    06-29-2015
    Location
    Hong Kong
    MS-Off Ver
    2013
    Posts
    3

    Re: Copy a sheet from xlsm to a new workbook result "module not find" error

    hi

    I am sorry not being clear.

    I must copy the sheet to a new workbook.
    (similar to right click sheet name "move or copy", since I have header and cell format which I want to keep, as it going to print out as invoice)

    Also the the new workbook do not need to keep any macro.


    Only copy the value does not solve the problem.

    Again thanks for the help.

+ 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. Need to run "sheet 1" Marco first then automatically run "Module 1" afterwards?
    By ElmerFud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-13-2014, 08:20 PM
  2. [SOLVED] Copy "csv-excel-sheet" to "xlsm-excel-workbook" in Excel2013 version.
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2013, 10:26 AM
  3. Replies: 1
    Last Post: 05-23-2013, 02:04 PM
  4. "Compile Error in hidden module in sheet 1" in excel
    By Raman Gupta in forum Excel General
    Replies: 1
    Last Post: 12-31-2012, 08:23 AM
  5. Replies: 11
    Last Post: 05-15-2012, 01:22 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