I basically copied code from a macro to sort and I get errors with a minor tweak. I'm not sure what's wrong.
Public Sub PopulateXL(varArray2Write() As Variant, strTitle As String)
Dim xlappApp As Excel.Application
Dim wkbkMain As Workbook
Dim wkshtMain As WorkSheet
Dim lngRowCount As Long...