Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Prompt for tab name and then prompt for number of iterations of ta

Need code to prompt users for the name of the sheet to copy and then prompt
for the number of copies of the sheet they want. I have dinked around with
this for a while and am really missing something

Thanks
--
bert_lady
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 149
Default Prompt for tab name and then prompt for number of iterations of ta

bert_lady,

Utilize the help documentation. Search "InputBox" and read the
documentation on Application.InputBox Method and InputBox Function. Also,
search "Worksheets.Add" and read the documentation for Worksheets.Add Method.
After you prompt the user for the worksheet name, you should validate that
the worksheet exists before prompting for the number of copies.

Start with the help documentation. If you are still having trouble, post
your code to the thread with any subsequent questions.

Best,

Matthew Herbert

"bert_lady" wrote:

Need code to prompt users for the name of the sheet to copy and then prompt
for the number of copies of the sheet they want. I have dinked around with
this for a while and am really missing something

Thanks
--
bert_lady

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Prompt for tab name and then prompt for number of iterations of ta

Sub SheetCopy22()
Dim I As Long
Dim shts As Long
Dim whichone As String
On Error GoTo endit
Application.ScreenUpdating = False
whichone = InputBox("enter sheet name to copy")
shts = InputBox("How many times?")
For I = 1 To shts
Sheets(whichone).Copy After:=ActiveSheet
' With ActiveSheet
' .Name = "NewSheet" & I
' End With
Next I
Application.ScreenUpdating = True
endit:
End Sub


Gord Dibben MS Excel MVP

On Thu, 27 Aug 2009 08:34:10 -0700, bert_lady
wrote:

Need code to prompt users for the name of the sheet to copy and then prompt
for the number of copies of the sheet they want. I have dinked around with
this for a while and am really missing something

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
How do I get an excel field to 'prompt' me to add a number to mul. OSF Excel Worksheet Functions 1 March 30th 06 01:51 AM
save prompt for user exit, but no save prompt for batch import? lpj Excel Discussion (Misc queries) 1 February 25th 06 03:08 AM
Auto-prompt/complete (?) function for number values Raj Mazumdar Excel Discussion (Misc queries) 1 January 10th 06 07:49 PM
Specify Printer and Prompt for Number of Copies? ChadDiesel Excel Programming 1 June 14th 05 02:18 AM
Prompt for Value halem2[_52_] Excel Programming 0 November 16th 04 03:14 PM


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