Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.
Dim xlApp As Object Dim xlBook As Object Dim xlSheet As Object Dim sFormula As String Dim rs As DAO.Recordset Dim j As Long Dim lLastRow As Long Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open(sFile) Set xlSheet = xlBook.Worksheets(1) xlSheet.Activate xlSheet.Application.Visible = False Set rs = Application.CurrentProject.Application.CurrentDb.OpenRecordset(sSQLExcel) With xlSheet .Range(sRange).copyfromrecordset rs .Range("AR:AZ").NumberFormat = "$#,##0.00;$-#,##0.00;""""" lLastRow = 2000 For j = 2 To lLastRow sFormula = "=SUM(AI" & j & ":AP" & j & ")" sFormula = Replace(sFormula, " ", "") .Range("AR" & j).Formula = sFormula Next j End With rs.Close Set rs = Nothing Set xlSheet = Nothing xlBook.Save xlBook.Close Set xlBook = Nothing Set xlApp = Nothing
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.