Embedding OLEObjects in excel sheet seem to cause errors for savings

bradyboyy88

Well-known Member
Joined
Feb 25, 2015
Messages
562
So I embed some word documents in a excel sheet. The problem is when I go to save it says errors were detected while savings blah .xlsm. Microsoft may be able to save the file by removing or repairing some features. To make repairs in a new file, click continue. To cancel saving blah blah blah. It never actually works for the repairs and I cannot save.

The code I used to add the objects is as follows:

Code:
If Worksheets("Search Interface").Shapes("EmbedCheckBox").ControlFormat.Value = 1 Then
            
            .OLEObjects.Add Filename:=File.Path, Link:=False, DisplayAsIcon:=True, Left:=.Range("D" & PrintRow).Left + 30, Top:=.Range("D" & PrintRow).Top + 3, Width:=50, Height:=10
            
End If

It is apart of a loop and it inserts each of these objects as a icon down the columns. I checked and they all open fine its just a matter of saving that I cannot do. If there is a fix to this then some help would be appreciated!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Doesnt the file save inside of the excel file so the original does not have to exist? So does that mean link parameter is allowed to be false? I really need to figure this out so any help or ideas to test would be great.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top