We have a small VBA function that inserts an image into an Excel 2010 worksheet. This function contains three options (file path, width, height). This function updates the image any time anything is changed with the formula that calls the function and deletes the previous old picture.
We would like to add a few features to this existing VBA function…
-Need one option added that allows the user to select how many pictures can be displayed on the worksheet at one time. Currently, if two functions are placed on a worksheet, only one image will be allowed to display at one time.
-We notice that with continued use of this function, the name of the picture that is inserted increases to very high number such as Picture 25123. We would like to somehow prevent this from happening. We would like it so that if there are say, two pictures, picture one will be named Picture 1 and the second picture will always be named Picture 2 and if for some reason another picture were to be added to the worksheet, its initial name would be Picture 3.
-Need to make sure that the size of the inserted picture is exactly what is specified by the width and height option (i.e. if 200 x 200 is specified, 200 x 200 should be what is displayed – currently it is a little bit larger)
-Need make sure that this function would work as expected in a workbook that contains many worksheets.
This should be a fairly straight forward project for someone experienced in VBA, especially considering that the initial function has a ready been created. If you would like to look at the initial VBA function, simply make a request via the PMB.