+ Reply to Thread
Results 1 to 4 of 4

Creating a new workbook, copying sheets & saving workbook - Subscript error

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Creating a new workbook, copying sheets & saving workbook - Subscript error

    Hi,

    Trying to create a new workbook from another open workbook, then copying all the sheets that aren't called "Summary" to that new open workbook and then saving it. I get a subscript error on this line:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Any ideas ?

    Thanks!
    amphi

  2. #2
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Creating a new workbook, copying sheets & saving workbook - Subscript error

    Hi there,
    is Your source workbook name "MergeMacro"?

    Also look at this row:
    Please Login or Register  to view this content.
    Better use:
    Please Login or Register  to view this content.
    When I copy Your code to my workbook, works as it should...
    Regards
    Miroslav R.

    (If You like my solutions, feel free to add reputation.)

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Creating a new workbook, copying sheets & saving workbook - Subscript error

    Thanks for picking that up Miroslav. Still isn't working on my side...

    Edit: Found what was missing. Had to specify the file extenstion:
    Please Login or Register  to view this content.
    Last edited by amphinomos; 05-30-2014 at 09:01 AM.

  4. #4
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Creating a new workbook, copying sheets & saving workbook - Subscript error

    Man,
    we forgot one basic thing - where is the extension *.xlsm / *.xls?
    Please Login or Register  to view this content.

+ 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. Getting 1004 error while copying data from sheets to master tab in the workbook
    By swapnilj1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2014, 10:40 AM
  2. [SOLVED] Consolidate multiple workbook sheets to one file - subscript out of range error?????
    By Crawfinator1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2013, 06:03 PM
  3. [SOLVED] Closing a Workbook from another workbook: Workbooks.close error: Subscript out of range
    By Coreyusa in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-14-2013, 06:45 PM
  4. Copying sheets to a new workbook and saving it.
    By walid66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2010, 04:36 PM
  5. creating new workbook and copying sheets to it
    By walid66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2010, 06:31 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