PDA

View Full Version : Inbedded Objects with links



GMan
12-22-2005, 09:16 AM
I have an excel report that is created monthly with several imbedded files that are shown as icons on the spreadsheet. There is one file that when imbedding the file I receive a prompt to "Update Links" which I do not want to do. Is there a way VBA can handle the "Don't Update Links" instead of having the user reply.:dunno

The code that is inserting the objects is below.

'insert object
ActiveSheet.OLEObjects.Add(Filename:=stDocPath, Link:=False, _
DisplayAsIcon:=True, IconFileName:=stIconType, _
IconIndex:=1, IconLabel:=stObjectName, _
Left:=Range(stObjectCell).Left, Top:=Range(stObjectCell).Top, _
Width:=Range(stObjectCell).Width, Height:=Range(stObjectCell).Height).Select
With Selection
.Placement = xlMoveAndSize
.PrintObject = True
End With


Thanks!