View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
somethinglikeant somethinglikeant is offline
external usenet poster
 
Posts: 94
Default Creating and renaming a worksheet from user input

Sub CustomerNumberAsNewSheet()
[A1].Select
Do Until IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
x = InputBox("Enter Customer Name", "Input")
y = InputBox("Enter Customer Number", "Input")
ActiveCell.Value = x
ActiveCell.Offset(0, 1).Value = y
Sheets("Blank").Select
Sheets("Blank").Copy After:=Sheets("Blank")
Sheets("Blank (2)").Name = y
End Sub

This code should give you what you need.

somethinglikeant