Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create new worksheet
Hello! I have a macro that when I press a button I want it to create a new
worksheet. The name of the worksheet shall be the current date. I do not know exactly how to write this so I would really appreciate some help. Pls help me with this code! Thank you very much! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create new worksheet
Hi Anne,
Try: '============= Public Sub Tester() Dim SH As Worksheet Set SH = Worksheets.Add(After:=Sheets(Sheets.Count)) SH.Name = Format(Date, "dd-mm-yy") End Sub '<<============= --- Regards, Norman "Arne Hegefors" wrote in message ... Hello! I have a macro that when I press a button I want it to create a new worksheet. The name of the worksheet shall be the current date. I do not know exactly how to write this so I would really appreciate some help. Pls help me with this code! Thank you very much! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create new worksheet
Worksheets.Add(After:=Worksheets(Worksheets.Count) ).Name = Format(Date,
"dd-mm-yy") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Arne Hegefors" wrote in message ... Hello! I have a macro that when I press a button I want it to create a new worksheet. The name of the worksheet shall be the current date. I do not know exactly how to write this so I would really appreciate some help. Pls help me with this code! Thank you very much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create new workbook and new worksheet and close. Worksheet not sav | Excel Worksheet Functions | |||
i need to create a 2nd worksheet from my base worksheet | Excel Discussion (Misc queries) | |||
Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error | Excel Discussion (Misc queries) | |||
Can I create a worksheet menu to select each other worksheet | Excel Discussion (Misc queries) | |||
Using VBA to create a new worksheet, and then target new worksheet | Excel Discussion (Misc queries) |