ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Change and refresh OLEObject showing Excel chart on Access form. (https://www.excelbanter.com/charts-charting-excel/214550-change-refresh-oleobject-showing-excel-chart-access-form.html)

Chrisso

Change and refresh OLEObject showing Excel chart on Access form.
 
(Sorry this is not strictly Excel charting but I have had no hints in
the Access groups where I posted this first - hoping someone in the
Excel world can help me)

Hi All

I display an Excel chart in a MS Acess User form using an unbound OLE
object. I am trying to change the Excel workbook(and therefore chart)
that my OLEObject displays:

Private Sub Form_Load()
With Me.oleExcelChart
' SourceDoc is currently "W:\Public\83.xls"
Debug.Print .SourceDoc
.SourceDoc = "W:\Public\XX.xls"
Debug.Print .SourceDoc
' ## how can I get the OLEobject to repaint/redisplay/
change?!
End With
End Sub

When run this results in this output:

W:\Public\83.xls
W:\Public\XX.xls

However the OLEObject is stil displaying 83.xls! How can I complete
the step and tell the OLEobject to refresh/update to the new/different
Excel file?

Thanks in advance for any ideas,
Chrisso


All times are GMT +1. The time now is 03:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com