Need help on this Macro.

  • Hi guys, I have a macro which it runs successfully in MS office 2003. But when I run it on MS office 2007,there is some error. Below are my codings. Can someone please advice whats wrong with it?
    The one with bold is the highlighted error.

    It has the following error message when i run it.
    "Run-time error '1004':
    Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook. To move or copy the data to the destination workbook, you can select the data, and then use Copy and paste commands to insert it into the sheets of another workbook."

  • Re: Need help on this Macro.


    Hello heartsdales,

    Welcome to Ozgrid. We're glad to have you on board, however, please note the following regarding thread titles and code tags:

    Thread titles are used in searching the forum, therefore, it is vital the be written to accurately describe your thread content or overall objective using ONLY search friendly key words.


    • The title must not use non-essential words such as:"Help needed", "Formula problem", "Please help", "urgent", "Code issue", "Need Advice", etc. Such words dilute the title/search results.
    • The title should not contain VBA code or formula syntax or use abbreviations, jargon, delimiters
    • The title should not assume or anticipate a solution as in referencing Excel functions or VBA methods - the actual solution is often quite different


    Your title of "Need help on this Macro" does not describe your thread or objective and is not helpful to those searching the forum for solutions to a similar need.

    Please note the change to your title, which is based on the objective stated in your thread.


    Also:

    Per the Forum Rules, VBA code must be wrapped in code tags, which you omitted.
    I've added the tags for you this time; please be sure to use them in future posts when needed.
    See the link in my signature for more information on how to use tags.

    How to use code tags
    [noparse]

    Code
    [/noparse]
    [COLOR=blue]Your code goes between these tags[/COLOR]
    [noparse]

    [/noparse]

    ---------------------------------------------------------------

    Please take some time to read through the forum rules. After you have done this, send me a PM that includes the following:

    1. Your acknowledgement of reading the rules and agreement to abide by them
    2. A proper thread title per the above guidelines

    After receiving the PM this thread will be re-opened.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!