janio

Auto Update from excel

Discussion created by janio on Aug 26, 2010
Latest reply on Aug 27, 2010 by janio

Hi,

 

I have an excel spreadsheet with the data of an online accompaniment and I need start automaticaly the auto-update of PI in Excel using VB when the Excel initialize. The support of OSIsoft says that it is not possible.

 

I used a simple solution describe above and i want know if anyone know another solution to help me?

 

Thank you.

Sub RealTime()

    recalcula = Now + TimeValue("00:00:10")
    Application.Workbooks("SSC_PI_V1.xls").Application.ontime recalcula, "atualizar"
End Sub

Sub atualizar()
    Application.Workbooks("SSC_PI_V1.xls").Worksheets("principal").Cells(7, 5) = Now
    Application.Workbooks("SSC_PI_V1.xls").Application.CalculateFullRebuild
    Call RealTime
End Sub

Outcomes