Thread: macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default macro

Dim NewOne As Worksheet

Set NewOne = Worksheets.Add()
NewOne.Name = "NewSheetName"

If you need to specify where the sheet goes, you can use the Before or After
parameters; see Help on the Worksheets Add Method for full details.

"Natalie" wrote:

I would like to record a macro that allows me to insert a new sheet. However,
it inserts a DIFFERENT sheet no everytime. How should I write a sub that will
technically allow me to insert a new sheet rather than a predefined sheet
name like sheet 4 or sheet 5? thanks