Thread: Add Worksheet
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Pflugs Pflugs is offline
external usenet poster
 
Posts: 167
Default Add Worksheet

Bob,

What would be the advantage in using an object in this instance?

Pflugs

"Bob Phillips" wrote:

Sub test()
Set wks = Worksheets.Add(After:=Worksheets(WorkSheets.Count) )
wks.Name = "taz"
End Sub


--
HTH

Bob Phillips

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

"T De Villiers"
wrote in message
news:T.De.Villiers.2btiky_1154363006.2003@excelfor um-nospam.com...

Hi,the following is a simpe macro to add a worksheet,
just doesnt seem to be working,
mnay thanks

Sub test()
Set wks = Worksheets.Add(After:=(Workbook.Sheets.Count))
wks.Name = "taz"
End Sub


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile:

http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566705