I ran into an odd problem with images in Excel 2010 last week – after looking at the sheet in Preview, a small logo graphic grew big enough to cover the most of the data on the sheet! Have you run into the problem where Excel images change size after Preview?
Before and After
Here’s how my company logo image looked before the Preview – just a nice, small-sized logo, at the top left of the sheet.
Here is a screen shot of the logo image after the Preview. That is not what I wanted it to look like!
Check the Picture Settings
The first thing I did was check the picture settings – right-click on the picture, and click Size and Properties
Then, in the Properties category, make sure the image is set to “Don’t move or size with cells.”
That setting was okay, so I didn’t know why the size changed. I Googled, but that didn’t help – the only suggestions were to check the image properties.
Paste in a new picture
There was a copy of the logo on another sheet in the file, so I deleted the oversized one, and pasted in a new copy.
Yikes! The new copy looked just as big as the oversized one, even though it was the correct size on the sheet where I’d copied it.
I tried deleting and copying a few more times, and the result was the same each time. Also, I found that the problem occurred whether I manually opened the Print Preview window, or used VBA to open it.
The Disappearing Picture
Finally, I noticed something odd, as I pasted the logo onto the problem sheet – after I pasted, I had to zoom out a bit, to find the pasted picture.
When I could see the pasted picture, it was the right size, instead of oversized. But, it was in the range of cells where it should have been visible, without zooming.
The picture disappeared after pasting, and only appeared when I zoomed. This was getting stranger and stranger!
Change the Zoom
I tried previewing again, and the image got larger, just as it did before. But this time, I didn’t delete the picture, I just increased the zoom level, from 100% to 110%. The picture immediately went back to the correct size, and stayed that size, when I put the zoom back to 100%.
I don’t know why the problem occurred, but I added a bit of code to the project, to increase the zoom level, then set it back to the previous zoom setting.
Here is the code that I used, just in case you run into a similar problem.
lZoom = ActiveWindow.Zoom ActiveWindow.Zoom = lZoom + 10 ActiveWindow.Zoom = lZoom
And if you’ve ever run into this, and know what causes the oversized images, please let me know!