RichBLACKIII
New member
- Local time
- Today, 12:17
- Joined
- Aug 5, 2010
- Messages
- 5
I can't seem to figure out how to reference a chart through its filepath to embed in my Access form in an Unbound Object Frame. I need to reference several charts from different worksheets and embed them also, so I need to figure out how reference them via their filepath name. Here is an example of the code that's not working
With dtb
.Visible = True
' Enable control.
.Enabled = True
' Set Locked property to False.
.Locked = False
' Allow embedded objects only.
.OLETypeAllowed = acOLEEmbedded
' Specify the OLE server and the type of object.
.Class = "Excel.Chart.8"
' Specify the file to be embedded.
.SourceDoc = "G:\000_Supply Chain\Procurement-Corporate\Spend Management\Spend Management 7-19-2010.Sheets("Direct-Charts").ChartObjects("Chart 35").Chart"
' Create the embedded object.
.Action = acOLECreateEmbed
End With
The ".SourceDoc =...." part is the non working part. Thanks for the help in advance !!!
With dtb
.Visible = True
' Enable control.
.Enabled = True
' Set Locked property to False.
.Locked = False
' Allow embedded objects only.
.OLETypeAllowed = acOLEEmbedded
' Specify the OLE server and the type of object.
.Class = "Excel.Chart.8"
' Specify the file to be embedded.
.SourceDoc = "G:\000_Supply Chain\Procurement-Corporate\Spend Management\Spend Management 7-19-2010.Sheets("Direct-Charts").ChartObjects("Chart 35").Chart"
' Create the embedded object.
.Action = acOLECreateEmbed
End With
The ".SourceDoc =...." part is the non working part. Thanks for the help in advance !!!