Need to create sheet in work book after every 2 miniutes

amittheexcel

Board Regular
Joined
Dec 17, 2013
Messages
50
Hi There,

I need to create excel tab after every 2 minutes as per sheet1 in workbook and rename them as per SR.no provided in sheet1 like below.

SR.NO
1
2
3
4
5
6
7
8
9
10
11
12
13
14

<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>
</tbody>
Regards,
Amit
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
With YOur Sheet NAMED -->> MAIN as follows: There should not be ANY OTHER SHEETS IN THE Workbook, only this one - MAIN

Opps -- Sorry After posting I just realized I forgot about the "Every 2 Minutes part" -- I'll get back to you later (on that revision).

Jim

Excel 2010
A
1SR.NO
21
32
43
54
65
76
87
98
109
1110
1211
1312
1413
1514

<tbody>
</tbody>
Main
Copy this Macro into a Standard Module. And then run Macro.

Code:
Sub CreateWorksheets()
Dim CurrSht As Worksheet
Range("A2").Select
i = 2
Application.ScreenUpdating = False
Do Until ActiveCell = ""
    Set CurrSht = Worksheets.Add(After:=Worksheets(Worksheets.Count))
    ActiveSheet.Name = "SR.NO " & Worksheets("Main").Cells(i, 1)
    Worksheets("Main").Activate
    ActiveCell.Offset(1).Select
    i = i + 1
Loop
Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0
Here's the Line which should be inserted AFTER the existing line i = i + 1 and Before the line Loop.

Application.Wait Now + TimeValue("00:02:00")

ALSO, you might want to comment out (Using the " ' " (apostrophe)) the 2 lines dealing with Screenupdating -- "SO YOU CAN SEE THE PROGRESS BEING MADE".

Not 100% positive, but that should work.. We'll See LOL,,,,

Jim
 
Last edited:
Upvote 0
To test this
- create a NEW workbook with ONLY one sheet (Sheet1)
- place typical values in Sheet1

Put this in a STANDARD module and run the macro
Code:
Sub CreateSheet()
    Sheets("Sheet1").Copy After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Name = Sheets.Count - 1
    Application.OnTime Now + TimeValue("00:02:00"), "CreateSheet"
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,193
Messages
6,123,560
Members
449,108
Latest member
rache47

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top