title: Highlight Top Row in Excel for Only Cells with Values | MS Access
body: <p>Essentially I have the following code I use in MS Access after Exporting an Excel.
  This works well for Applying the Filter Functionality and Making the Cell Values Bold, but how can I also highlight the cells of those same values?</p>
  <pre><code>   'Specifying Tables
  
  DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, &quot;Table1&quot;,&quot;.xlsx&quot;, True
  
  
  DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, &quot;Table2&quot;,&quot;.xlsx&quot;, True
  
  Call ModifyExportedExcelFileFormats(&quot;.xlsx&quot;, &quot;Table1&quot;)
  
  Call ModifyExportedExcelFileFormats(&quot;.xlsx&quot;, &quot;Table2&quot;)
  </code></pre>
  <p>__</p>
  <pre><code>Public Sub ModifyExportedExcelFileFormats(sFile As String, sSheet As String)
  
  Dim xlApp As Object
  Dim xlSheet As Object
  
  Set xlApp = CreateObject(&quot;Excel.Application&quot;)
  Set xlSheet = xlApp.Workbooks.Open(sFile).Sheets(1)
  
  
  
  With xlApp
          .Application.Sheets(sSheet).Select
          .Application.Rows(&quot;1:1&quot;).Select
          .Application.Selection.Font.Bold = True
          
          .Application.range(&quot;A1&quot;).Select
          .Application.Selection.AutoFilter
          
          
          .Application.Cells.Select
          .Application.Selection.Columns.AutoFit
          .Application.range(&quot;A1&quot;).Select
          
          .Application.Activeworkbook.Save
          .Application.Activeworkbook.Close
          .Quit
     End With
  </code></pre>
  <p>End Sub</p>
  <p>How can this properly used to only highlight the cells in the top row that have values in them?</p>
  <pre><code>        .Application.Selection.Interior.Color = vbYellow
  </code></pre>