Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Data from another worksheet based on user input Alvyn Excel Worksheet Functions 14 August 6th 08 05:41 PM
Creating Input box that grap data based on user answer salooha[_4_] Excel Programming 1 February 1st 06 11:30 PM
Creating pick box with unique input values from a worksheet in the Tom Ogilvy Excel Programming 1 August 3rd 04 07:07 PM
Creating a Directory from a user input Ron de Bruin Excel Programming 4 July 13th 04 09:19 PM
Help creating link & formula from user input bturner2 Excel Programming 2 June 9th 04 07:19 PM


All times are GMT +1. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"