Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prompt for name when copying sheet
I have created a simple macro that copies an existing sheet in a
workbook. Is there anyway to generate a user prompt to name the newly created sheet? Your time and effort is much appreciated by a relatively new user. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prompt for name when copying sheet
Try this Madvark
Sub test() Dim ShName As String ShName = InputBox("Fill in a Sheet name") If Trim(ShName) < "" Then Application.ScreenUpdating = False On Error Resume Next ActiveSheet.Copy after:=Sheets(Sheets.Count) ActiveSheet.Name = ShName On Error GoTo 0 Application.ScreenUpdating = True End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Madvark" wrote in message om... I have created a simple macro that copies an existing sheet in a workbook. Is there anyway to generate a user prompt to name the newly created sheet? Your time and effort is much appreciated by a relatively new user. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. | Excel Worksheet Functions | |||
Unwanted Prompt When Saving a Protected Sheet in 2007 | Excel Discussion (Misc queries) | |||
How do I disable save prompt when exiting a sheet? | Excel Discussion (Misc queries) | |||
password prompt to unhide sheet | Excel Programming | |||
Delete sheet without prompt | Excel Programming |