Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating and renaming a worksheet from user input
I need a macro that opens a dialog box and asks for a customer number and a
customer name and adds these two items to the bottom of a list of customers. Then I want Excel to copy a worksheet titled "Blank" (already present in the workbook) and rename it as the Customer Number: (Example - 2156 or whatever they enter.) As usual any help would be appreciated. Jonco |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extracting Data from another worksheet based on user input | Excel Worksheet Functions | |||
Creating Input box that grap data based on user answer | Excel Programming | |||
Creating pick box with unique input values from a worksheet in the | Excel Programming | |||
Creating a Directory from a user input | Excel Programming | |||
Help creating link & formula from user input | Excel Programming |