How to refresh an Excel workbook from VBA

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.
 
P

Patrick Molloy

you can just add

Calculate

for the whole workbook, or
[Object.]Calculate

where the object can be worksheet or range
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top