View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Creating a new worksheet

Sub newsheet()
Dim shtname as String
shtname = InputBox("Type a name")
ActiveWorkbook.Worksheets.Add
ActiveSheet.Name = shtname
End Sub


Gord Dibben MS Excel MVP

On Sun, 03 Jan 2010 11:44:15 -0800, JasonK wrote:

TIA boys and girls.


I need a macro that will create a worksheet titled what ever the user
wants to name it.

I would guess that means it would open a dialog box and then name the
sheet what the user writes in the box. I just can't figure out how to
do it.

Thanks for all your help,

JasonK