Shanmugam N
New Member
Hi i need a macro coding for the below question i tried something but its not working could you pls help..?
Create a macro which will ask the user how many workbooks to be created and save that many workbooks. The title can be saved as 1.xlsx , 2.xlsx and so on
I tried like this
Sub Scenario15()
Dim i As Double
For i = 1 To Workbooks.Count
Workbooks.Add
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\Shan" & i & ".xlsx"
ActiveWorkbook.Close
Next
End Sub
Create a macro which will ask the user how many workbooks to be created and save that many workbooks. The title can be saved as 1.xlsx , 2.xlsx and so on
I tried like this
Sub Scenario15()
Dim i As Double
For i = 1 To Workbooks.Count
Workbooks.Add
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\Shan" & i & ".xlsx"
ActiveWorkbook.Close
Next
End Sub