Closed Thread
Results 1 to 7 of 7

How to add a new sheet using VBA?

  1. #1
    Registered User
    Join Date
    06-18-2007
    Posts
    9

    How to add a new sheet using VBA?

    In sheet1 cell (A2), i have to enter a number and that number would create the number of new sheets.

    Eg. if i enter a 4 on (A2), 4 new spreadsheets are being created.

    how do i do it? Need some urgent help here.. thanks

  2. #2
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    How to add a new sheet using VBA?

    If you mean worksheets and not spreadsheets try something like :

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-18-2007
    Posts
    9

    Re: your help

    Quote Originally Posted by Steel Monkey
    If you mean worksheets and not spreadsheets try something like :

    Please Login or Register  to view this content.
    I have tried your coding and it works but how to not let the number in A2 disappear? I want the number to stay there and how to make it run automatically?

    Eg. I no need to click on the run button in order for it to run but just by typing any number on A2 and it will generate itself

  4. #4
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    How to add a new sheet using VBA?

    Insert this into the Sheet1 module

    Please Login or Register  to view this content.
    Let me know how you go!

  5. #5
    Registered User
    Join Date
    06-18-2007
    Posts
    9
    Quote Originally Posted by Steel Monkey
    Insert this into the Sheet1 module

    Please Login or Register  to view this content.
    Let me know how you go!

    hmm.. can you help me do it on excel and send me the attachment file so that i can understand it better.

    Thanks

  6. #6
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    How to add a new sheet using VBA?

    Please see attached spreadsheet

    Any questions let me know!
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    How to add a new sheet using VBA?

    Please note rule 4 to posting:
    4). If you post the same question to other sites as well, please provide a link to that post so that it would be checked that if your post has already been answered.

    cross posted on ozgrid and mrexcel

Closed 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