+ Reply to Thread
Results 1 to 3 of 3

Code to insert Worksheet before a specific worksheet in a workbook

  1. #1
    Registered User
    Join Date
    09-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Code to insert Worksheet before a specific worksheet in a workbook

    Hi All

    I have a userform which creates a worksheet from a template sheet and renames it based on the on the Class field in that form.
    It places that sheet before Sheet 26 but this sheet number seems to change after the New Sheet is added.
    I would like a macro to be able to insert the new sheet after the last J** sheet each time so the J* sheet run in sequence.

    Please Login or Register  to view this content.
    I have a second issue in that I need the code to also place the info from the Class field and place it in the first free space in the Menu Sheet after the last J** and then create a hyperlink to that sheet.

    Any help would be appreciated.

    Thanks in advance.

    Tony
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Code to insert Worksheet before a specific worksheet in a workbook

    Try changing
    Please Login or Register  to view this content.
    to replace WorksheetName with the name of your sheet
    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    09-09-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Code to insert Worksheet before a specific worksheet in a workbook

    Thanks Mike

    i can't believe I overlook the simple solution to that.

    Do you have any ideas on the second part of my problem.

    Thanks

    Tony

+ 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