Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add new sheet automatically every data.
Hi all,
I have four users and everyone update some information in a sheet and runs a macro to update that information in a centerlized database sheet. Now my problem is every day i have to add a new-sheet (Sheet Name is Todays Date) manually in the database sheet which i want to avoid. I dont know how to write a code which will detect todays date sheet if it is not there it should create it automatically. I just to add this code in my macro. Regards Heera |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add new sheet automatically every data.
You have to change the FORMAT statement below to match the method you are
naming the worksheet. Sub test() ShtName = Format(Date, "mm_dd_yy") Found = False For Each sht In Sheets If sht.Name = ShtName Then Set TodaySht = sht Found = True Exit For End If Next sht If Found = False Then Sheets.Add after:=Sheets(Sheets.Count) Set TodaySht = ActiveSheet TodaySht.Name = ShtName End If End Sub "Heera Chavan" wrote: Hi all, I have four users and everyone update some information in a sheet and runs a macro to update that information in a centerlized database sheet. Now my problem is every day i have to add a new-sheet (Sheet Name is Todays Date) manually in the database sheet which i want to avoid. I dont know how to write a code which will detect todays date sheet if it is not there it should create it automatically. I just to add this code in my macro. Regards Heera |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
invoice on sheet 1 & data store on sheet 2 automatically | Excel Discussion (Misc queries) | |||
Particulars data Filter from sheet 1 to sheet 2 automatically | Excel Worksheet Functions | |||
How to Automatically transfer specific Data from Sheet 1 to Sheet | Excel Worksheet Functions | |||
create a formula in one sheet that would read data from separate sheet automatically | Excel Discussion (Misc queries) | |||
can entered data in sheet 1 be automatically pasted in sheet 2 | Excel Discussion (Misc queries) |