title: Loop data validation list and print to PDF in current folder
body: <p>I was able to get code to loop through my validation list and have it print to PDF for each of the items in the list.  Is there a way for me to have it print to the current folder so it doesn't ask me every time which folder I want to use?  I just wasn't sure exactly how to adjust the code or even if it could be done.</p>
  
  <pre><code>Sub Loop_Through_List()
      Dim cell                  As Excel.Range
      Dim rgDV                  As Excel.Range
      Dim DV_Cell               As Excel.Range
  
      Set DV_Cell = Range("B1")
  
      Set rgDV = Application.Range(Mid$(DV_Cell.Validation.Formula1, 2))
      For Each cell In rgDV.Cells
          DV_Cell.Value = cell.Value
          Call PDFActiveSheet
      Next
  End Sub
  
  Sub PDFActiveSheet()
      Dim ws                    As Worksheet
      Dim myFile                As Variant
      Dim strFile               As String
      Dim sFolder               As String
      On Error GoTo errHandler
  
      Set ws = ActiveSheet
  
      'enter name and select folder for file
      ' start in current workbook folder
      strFile = ws.Range("B1").Value &amp; " Period " &amp; ws.Range("J1").Value
  
      sFolder = GetFolder()
      If sFolder = "" Then
          MsgBox "No folder selected. Code will terminate."
          Exit Sub
      End If
      myFile = sFolder &amp; "\" &amp; strFile
  
      ws.ExportAsFixedFormat _
              Type:=xlTypePDF, _
              Filename:=myFile, _
              Quality:=xlQualityStandard, _
              IncludeDocProperties:=True, _
              IgnorePrintAreas:=False, _
              OpenAfterPublish:=False, _
              From:=1, _
              To:=2
  
      exitHandler:
          Exit Sub
      errHandler:
          MsgBox "Could not create PDF file"
          Resume exitHandler
  End Sub
  
  Function GetFolder() As String
      Dim dlg                   As FileDialog
      Set dlg = Application.FileDialog(msoFileDialogFolderPicker)
      dlg.InitialFileName = ThisWorkbook.Path &amp; "\"
      dlg.Title = "Select folder to save PDFs"
      If dlg.Show = -1 Then
          GetFolder = dlg.SelectedItems(1)
      End If
  End Function
  </code></pre>