Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
invoice on sheet 1 & data store on sheet 2 automatically Sudipta Sen[_2_] Excel Discussion (Misc queries) 2 November 25th 09 01:38 PM
Particulars data Filter from sheet 1 to sheet 2 automatically Sudipta Sen[_2_] Excel Worksheet Functions 4 September 7th 09 04:20 PM
How to Automatically transfer specific Data from Sheet 1 to Sheet Jman Excel Worksheet Functions 12 May 10th 07 05:35 AM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
can entered data in sheet 1 be automatically pasted in sheet 2 Adnan Jahangir Excel Discussion (Misc queries) 1 February 23rd 06 10:06 AM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"