title: Export row to PDF/ Word using cell number selected in a dropdown
body: <p>I am using the code below to export a row in an Excel sheet into a Word/pdf file.</p>
  
  <p>It is downloading all non-blank rows.</p>
  
  <p>I want when I select a reference number in a cell dropdown ("CA2"), it only downloads that selected row.</p>
  
  <pre><code>Sub Download_Click()
  
  Dim CustRow, CustCol, LastRow, TemplRow, Reference, RefRow As Long
  Dim DocLoc, TagName, TagValue, TemplName, FileName As String
  Dim CurDt, LastAppDt As Date
  Dim WordDoc, WordApp, OutApp, OutMail As Object
  Dim WordContent As Word.Range
  
  With Sheet3
  
      TemplRow = .Range("CI1").Value
      TemplName = .Range("BV2").Value
      Reference = .Range("CA2").Value
      DocLoc = Sheet3.Range("CG2").Value
  
      On Error Resume Next
      Set WordApp = GetObject("Word.Application")
      If Err.Number &lt;&gt; 0 Then
          Err.Clear
          Set WordApp = CreateObject("Word.Application")
          WordApp.Visible = True
      End If
  
      LastRow = .Range("A9999").End(xlUp).Row
      For CustRow = 3 To LastRow
          Set WordDoc = WordApp.Documents.Open(FileName:=DocLoc, ReadOnly:=False)
          For CustCol = 1 To 70
              TagName = .Cells(2, CustCol).Value
              TagValue = .Cells(CustRow, CustCol).Value
              With WordDoc.Content.Find
                  .Text = TagName
                  .Replacement.Text = TagValue
                  .Wrap = wdFindContinue
                  .Execute Replace:=wdReplaceAll
              End With
          Next CustCol
  
          If .Range("BX2").Value = "PDF" Then
              FileName = ThisWorkbook.Path &amp; "\" &amp; .Range("B" &amp; CustRow).Value &amp; "_" &amp; .Range("C" &amp; CustRow).Value &amp; ".pdf"
              WordDoc.ExportAsFixedFormat OutputFileName:=FileName, ExportFormat:=wdExportFormatPDF
              WordDoc.Close False
          Else
              FileName = ThisWorkbook.Path &amp; "\" &amp; .Range("B" &amp; CustRow).Value &amp; "_" &amp; .Range("C" &amp; CustRow).Value &amp; ".docx"
              WordDoc.SaveAs FileName
          End If
      Next CustRow
      WordApp.Quit
  
  End With
  
  End Sub
  </code></pre>