G
Guest
The VBA macro I've set takes values from a fields in a form, and then places them into an excel spreadsheet. I then apply those values to a calculation set up in excel. Then I want to retrieve the answer, (eventually multiple cells values) to be presnted in the form in access.
Program reads:
Dim FaceAmount as Double
FaceAmount = Me.Face_Amount
Dim xlx As Object, xlw As Object, xls As Object, xlc As Object
Set xlx = CreateObject("Excel.Application")
xlx.Visible = True
Set xlw = xlx.workbooks.Open("C:\calcfile.xls")
Set xls = xlw.Worksheets("CalcSheet")
Set xlc = xls.Range("A1")
xls.Range("$B$3") = FaceAmount
Me.DepositCalc = xls.Range("$B$5").Value < Here is where the programs stops> Here I'm trying set the value in
the access form equal to the calculated value in excel calcsheet.xls
Program reads:
Dim FaceAmount as Double
FaceAmount = Me.Face_Amount
Dim xlx As Object, xlw As Object, xls As Object, xlc As Object
Set xlx = CreateObject("Excel.Application")
xlx.Visible = True
Set xlw = xlx.workbooks.Open("C:\calcfile.xls")
Set xls = xlw.Worksheets("CalcSheet")
Set xlc = xls.Range("A1")
xls.Range("$B$3") = FaceAmount
Me.DepositCalc = xls.Range("$B$5").Value < Here is where the programs stops> Here I'm trying set the value in
the access form equal to the calculated value in excel calcsheet.xls