Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
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
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. Alex Zuniga Excel Worksheet Functions 1 November 25th 09 11:54 PM
Unwanted Prompt When Saving a Protected Sheet in 2007 faraway Excel Discussion (Misc queries) 0 May 6th 09 12:46 PM
How do I disable save prompt when exiting a sheet? Copter32 Excel Discussion (Misc queries) 7 March 12th 08 04:25 PM
password prompt to unhide sheet Jeff Excel Programming 1 June 9th 04 08:40 PM
Delete sheet without prompt chad Excel Programming 3 June 3rd 04 09:26 PM


All times are GMT +1. The time now is 01:33 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"