+ Reply to Thread
Results 1 to 7 of 7

Add worksheets,

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    259

    Add worksheets,

    Hi, I have written this code to add worksheets to workbooks. It works okay apart from it adds the sheets in reverse order I type 15 in the (Inputbox) and it adds 15 where worksheet 1 should be. Any ideas? Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Add worksheets,

    you forgot to add "After:=Worksheets(Worksheets.Count)"

    Try this :

    Please Login or Register  to view this content.
    Please click the * below if this helps

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Add worksheets,

    Try changing this line:
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Add worksheets,

    isn't that what I said?

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Add worksheets,

    It certainly is. When I started writing my response, you hadn't yet posted yours.

  6. #6
    Forum Contributor
    Join Date
    05-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Add worksheets,

    Thanks guys, i'm not sure if its me but i'm still getting the sheets in reverse order?

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Add worksheets,

    Can you post a copy of your file?

+ 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