Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Create new worksheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arne Hegefors - 19 Sep 2006 08:44 GMT
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!
Norman Jones - 19 Sep 2006 09:16 GMT
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

> 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!
Bob Phillips - 19 Sep 2006 11:21 GMT
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = Format(Date,
"dd-mm-yy")

Signature

HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

> 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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.