title: Looping folders names from excel file vba
body: <p>I have a code that will copy the desired files that I want
  here's the code</p>
  
  <pre><code>Dim saveFolder As String
  Dim fname As String
  
  saveFolder = "C:\Copied file"
  
  folder = Workbooks("Macros.xlsb").Worksheets("folder").Range("A2")
  FileName = Workbooks("Macros.xlsb").Worksheets("path").Range("B4")
  
  Path = FileName &amp; "\" &amp; folder &amp; "\Samples\*.xlsx"
  file = Dir(Path)
  
  Workbooks.Open Path
  
  Sheets("Accounts").copy
  ActiveWorkbook.SaveAs saveFolder &amp; "\Accounts.xlsx", FileFormat:=51
  Workbooks(file).Close
  
  ActiveWorkbook.Close
  </code></pre>
  
  <p>it works well but I need to input manually the folder name in the cell column. But I'm clicking every after the macro is done for 1 folder only and so on.</p>
  
  <p>I just want to know how to loop it.</p>
  
  <p>this will be my worksheet(folder) for the folder names:</p>
  
  <pre><code>FOLDER
  45
  118
  180
  290
  </code></pre>
  
  <p>I want to loop the macro for each cells. so that I don't need to click/edit one by one the values. because the folder names can be changed momentarily.</p>