Worksheet help please

J

Jako

Tom gave me this code to create worksheets with the date on them.

worksheets.Add After:=Worksheets(worksheets.count)
worksheets(worksheets.count).Name = Format(Date,"ddmmyyyy")

What i need to do is on each of these Worksheets i need to put
"Auditor Name" in Range("A2").

I have tried a few things but only get the text on the last sheet.

Please help
 
E

Edward Ulle

Try this

Dim wsNewWorksheet As Worksheet

Set wsNewWorksheet = Worksheets.Add After:=Worksheets(Worksheets.Count)
wsNewWorksheet.Name = Format(Date,"ddmmyyy")
wsNewWorksheet.Range("A2")="Auditor Name"


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

Jako

Thanks for the help Edward but i get an error on this :

Set wsNewWorksheet = Worksheets.Ad
After:=Worksheets(Worksheets.Count)

Any ideas
 
E

Edward Ulle

Sorry forgot the parenthesis.

I cut this from my code so sure it should work.

Set wsNewWorksheet = Worksheets.Add(After:=Worksheets(Worksheets.Count))




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Top