How do you get Excel to refresh data on Worksheet from within VBA?

M

mike

How do you get spreadsheet data in Excel to recalculate itself from
within VBA, without the need of just changing a cell value on the
worksheet?



Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With Cells(6, "k")
If Cells(7, "f") = "Open" Then
If Cells(6, "k") <= Cells(7, "d") Then
Cells(7, "f") = "Filled"
End If
End If
End With

End Sub


I have cell: K6 connected to an external price feed that changes
automatically.

Your help on this is greatly appreciated.

Thank you

Mike Stafford
 
J

jamescox

Possibly overkill, but check out Application.CalculateFull and
Application.CalculateFullRebuild in the help or VB IDE Object Browser.
 

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