I am not sure how MS Graph works. When I did this in Excel, I set up an
access table called Exchange with only 1 record in it with the fields I
wanted to share. Here is the code I added to the Excel spreadsheet that was
set up to run as an event when a particular cell in the spreadsheet changed.
When the data changed, excel will update the data fields in the Exchange
table that is to be shared. In Access then you can pick up the data you need
from the table. In your case, you would put the data you needed for the
graph into the Exchange table, and just read it in MS Graph. I am assuming
you can run a VB script in MS Graph that will run when the graph is loaded.
Here is my code:
Dim cnnConn As ADODB.Connection
Set cnnConn = New ADODB.Connection
Dim rst As ADODB.Recordset
With cnnConn
.Provider = "Microsoft.JET.OLEDB.4.0;"
.ConnectionString = "c:\path to data base\databasename.mdb
End With
cnnConn.Open
Set rst = cnnConn.Execute("select * from exchange where recordnumber=1")
Set temp1 = Range("BudgetTotalIncome")
Set temp2 = Range("BudgetTotalExpense")
Set rst = cnnConn.Execute("update exchange set" _
& " BudgetTotalIncome='" & temp1 _
& "', BudgetTotalExpense='" & temp2 _
& "'where recordnumber=1")
Set cnnConn = Nothing
End Sub
Sorry I can't be more specific - I am not that familar with the programs you
are using. I just thought my experience with excel as an embedded Object
might help.