Hello, can anyone suggest how to repeat this macro based on the # of selections in a list.
the list is located in Summary, AI21
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("Summary").Select
Range("AI21:AK22").Select
Calculate
Sheets("EWAML.DATAQUERY").Select
Sheets("EWAML.DATAQUERY").Move Before:=Workbooks("MacroFileforTabs.xlsx"). _
Sheets(1)
Windows("Enterprise AML Master Database_MasterSubmssion.Nov18.xlsm").Activate
ActiveWorkbook.BreakLink Name:= _
"C:\Users\ah29045\Desktop\MacroFileforTabs.xlsx", Type:=xlExcelLinks
Dim Path As String
Dim filename As String
Path = "C:\Users\ah29045\Desktop"
filename = Sheets("Summary").Range("AI21").Text
ActiveWorkbook.SaveAs filename:=Path & "Enterprise AML Master Database_MasterSubmission_Nov18_" & filename & ".xlsx", FileFormat:=xlOpenXMLWorkbook
ActiveSheet.Shapes.Range(Array("Option Button 1")).Select
Selection.Delete
Selection.Cut
End Sub
the list is located in Summary, AI21
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("Summary").Select
Range("AI21:AK22").Select
Calculate
Sheets("EWAML.DATAQUERY").Select
Sheets("EWAML.DATAQUERY").Move Before:=Workbooks("MacroFileforTabs.xlsx"). _
Sheets(1)
Windows("Enterprise AML Master Database_MasterSubmssion.Nov18.xlsm").Activate
ActiveWorkbook.BreakLink Name:= _
"C:\Users\ah29045\Desktop\MacroFileforTabs.xlsx", Type:=xlExcelLinks
Dim Path As String
Dim filename As String
Path = "C:\Users\ah29045\Desktop"
filename = Sheets("Summary").Range("AI21").Text
ActiveWorkbook.SaveAs filename:=Path & "Enterprise AML Master Database_MasterSubmission_Nov18_" & filename & ".xlsx", FileFormat:=xlOpenXMLWorkbook
ActiveSheet.Shapes.Range(Array("Option Button 1")).Select
Selection.Delete
Selection.Cut
End Sub