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
|