How to refresh an Excel workbook from VBA

  • Thread starter Thread starter RSunday
  • Start date Start date
R

RSunday

I want to run a number of scenarios through a business model in Excel.

I have all my input values in an Access table and can load them into the
relevant cells of my Excel sheet through Access-VBA.

I can also pick the resulting values from my Excel sheet.

Only thing I need to do is to refresh the calculations as a result of my new
input.

How is that done from VBA?

I link to my Excel through this code:

Dim xlBook As Object
Set xlBook = xlApp.Workbooks.Open(path & "\" & filename, 0, True)

and then I can access cell values.
 
you can just add

Calculate

for the whole workbook, or
[Object.]Calculate

where the object can be worksheet or range
 
Back
Top