Hello All,
I am creating a database based on a tool that is currently in Excel. One part of Excel that I want to keep is the chart. (Side note: I have tried to recreate the chart in Access and cannot.) I'm using a report to view the chart. I have a command button on the report (for testing purposes) that runs the code that will launch Excel and run the macro that updates the chart. The chart updates it (I watch it happen.) The chart on the report will not update unless I go back into design view. I have searched high and low for an answer to this, but I cannot find one.
The code to run the Excel macro is:
The macro in Excel works. Why do you think the unbound object will not update when I click that button?
I am creating a database based on a tool that is currently in Excel. One part of Excel that I want to keep is the chart. (Side note: I have tried to recreate the chart in Access and cannot.) I'm using a report to view the chart. I have a command button on the report (for testing purposes) that runs the code that will launch Excel and run the macro that updates the chart. The chart updates it (I watch it happen.) The chart on the report will not update unless I go back into design view. I have searched high and low for an answer to this, but I cannot find one.
The code to run the Excel macro is:
Code:
Private Sub cmdGenerateCurve_Click()
Dim xl As Object
'Step 1: Start Excel, then open the target workbook.
Set xl = CreateObject("Excel.Application")
xl.workbooks.Open ("\\stnafddco001.us590.corpintra.net\h104\KCASAGR\Data\My Documents\VSO_DB\Integrator_2015-07-13.xlsm")
'Step 2: Make Excel visible
xl.Visible = True
'Step 3: Run the target macro
xl.Run "ShowFormAccess", [Engine], [Curve_Number]
DoEvents
DoEvents
'Step 4: Close and save the workbook, then close Excel
xl.ActiveWorkbook.Close (True)
xl.Quit
'Step 5: Memory Clean up
Set xl = Nothing
End Sub
The macro in Excel works. Why do you think the unbound object will not update when I click that button?