Can you apply a picture (gif) to a specific cell??


Posted by Scott on October 24, 2001 6:37 AM

I have a gif file that I want to use code to place in a specific cell (not attached to the drawing layer but actually becomes part of the cell). Is this possible?

Thanks
Scott



Posted by Damon Ostrander on October 25, 2001 7:54 AM

Hi Scott,

No, unfortunately cells cannot accept gif files. Monochrome graphics can be put in cells by way of fonts (i.e., for example you can put a company logo graphic in a cell if that graphic has been converted to a TrueType font character). Of course, converting a graphic to a font character requires special software.

I know that you don't want it to be part of the "drawing layer," but are you aware that it is possible to write VBA code that automatically centers a graphic on a particular cell, and even sizes the cell's row height and column width to exactly fit that graphic to the cell? This can be made to work even as the worksheet is modified in ways that cause the cell to change its position, so to the user it appears that the graphic is "in" the cell.

Happy computing.

Damon