通过访问vba在excel中填充公式

我试图从Excel中访问数据库VBA.I提到这个 Excel表格填写公式

这是我的代码

Dim xlApp As Excel.Application Dim wb As Workbook Dim strFormulas(1 To 4) As Variant txtcatpath = Form_Bom.Excelpath.Value Set xlApp = CreateObject("Excel.Application") With xlApp Set wb = .Workbooks.Open(txtcatpath) .Visible = True End With With wb.Sheets("common based") strFormulas(1) = "=IF(F4<>F5,E4,E4&""&H5)" strFormulas(2) = "=VLOOKUP(J4,F:H,3,FALSE)" strFormulas(3) = "=IF(COUNTIF(F4:F900,F4)=1,F4,"")" strFormulas(4) = "=SUMIF(F:F,J4,G:G)" .Range("H4:K4").Formula = strFormulas .Range("H4:K" & LRow & "").FillDown End With 

当debugging我的代码在.Range("H4:K4").Formula = strFormulas 。 我如何填写公式的列。