+ Reply to Thread
Results 1 to 2 of 2

Insert sheet with macro

  1. #1
    Registered User
    Join Date
    08-11-2015
    Location
    Scandinavia
    MS-Off Ver
    2010
    Posts
    1

    Question Insert sheet with macro

    Hi,

    I want a macro that:

    1. Inserts a new sheet based on a template (not an empty sheet)
    2. A box asking for the new sheet name I want to use, eg. ABCD
    3. If the sheet name already is used, it should count the sheets, eg. ABCD(1), ABCD(2) and so on.


    I have tried to combine information from several examples into this:
    Please Login or Register  to view this content.

    Problem 1:
    It seems like the template file must be in the Users\Appdata..... folder. Not possible with Network Access to J:\. Then it's not possible for multiple users to insert sheets based on the template. Any solution?
    Maybe an empty template within this files that it copies, instead of adding a new from a separate file?

    Problem 2:
    If the sheet name ABCD is being used, it renames it to Sheet1(2), Sheet1(3) and so on, instead of ABCD(2). How to solve this?

    Problem 3:

    Not the biggest issue, but it doesn't refer to the correct sheet names in the message boxes.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Insert sheet with macro

    Try this...
    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 08-11-2015 at 07:39 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. [SOLVED] Protect sheet but allow insert macro.
    By r2fro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2014, 05:44 PM
  2. Macro for copying the data from one sheet and insert the same in next sheet
    By Thinker8 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2013, 05:51 PM
  3. Macro to insert a formula to another sheet
    By Drayloc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2012, 12:48 PM
  4. Macro to search sheet 1 for value and insert entire row from sheet 2
    By mtlong88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2011, 01:21 PM
  5. Insert Data From One Sheet to Another with Macro
    By niladri20005 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2011, 08:14 AM
  6. macro tp insert excel sheet
    By navinaaaaaa in forum Excel General
    Replies: 1
    Last Post: 12-30-2010, 10:29 PM
  7. Macro - Combine/Insert Sheet
    By dugong in forum Excel General
    Replies: 2
    Last Post: 02-07-2007, 10:58 AM
  8. MAcro to copy and insert a sheet
    By JackR in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-19-2006, 09:10 PM

Tags for this Thread

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