For i = 1 To inputbox(“how many”)

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguille...@gmail.com

From: Aamir Shahzad 
Sent: Saturday, May 12, 2012 1:51 PM
To: excel-macros@googlegroups.com 
Subject: $$Excel-Macros$$ amend in macro

Dear Group,



Following macro provided by anyone in this forum & this code is working fine 
but I want to amend into this coding e.g. when run this code it should ask by 
msg box "How many sheets do you want to add?" then take the input e.g 10 or any 
number then add sheets which given by user. Kindly do the needful. Thanks in 
advance. 



Sub Sheet1Multiplecopy()
Dim i As Integer
i = 1
For i = 1 To 100
Sheets("Sheet1").Select
Sheets("Sheet1").Copy After:=Sheets(i)
ActiveSheet.Name = i
Next
End Sub
 
Regards,

Aamir Shahzad


-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
 
------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to