Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I get an excel field to 'prompt' me to add a number to mul. | Excel Worksheet Functions | |||
save prompt for user exit, but no save prompt for batch import? | Excel Discussion (Misc queries) | |||
Auto-prompt/complete (?) function for number values | Excel Discussion (Misc queries) | |||
Specify Printer and Prompt for Number of Copies? | Excel Programming | |||
Prompt for Value | Excel Programming |