Hi,
I'm not an expert with VBA and i copied a code from this forum but there is an error in it and i can't figure out how to fix it, i hope someone will see this and help me with it.
I have multiples sheets with this function in multiples cells :
=SI(D22="LUNETTES",Image("lunettes.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="BOTTES - SOULIERS",Image("bottes.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(OU(D22="GANTS",D22="GANTS TIG",D22="GANTS NSK24"),Image("gants.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="SARRAU",Image("sarrau.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="BOUCHONS",Image("bouchons.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="CASQUE",Image("casque.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="DOSSARD",Image("dossard.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="HABIT PEINTRE",Image("habitpeintre.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="HARNAIS",Image("harnais.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(OU(D22="MASQUE ANTI POUSSIERE",D22="MASQUE CARTOUCHES"),Image("masque.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="MASQUE VENTILLE",Image("masqueventil.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),SI(D22="VISIERE COMPLETE",Image("visiere.png","K:\Public\TDC\02 - SANTE SECURITE\Équipements de sécurité\Images"),""))))))))))))
** SI = IF , sorry my excel is in french but my code is in english
So i have this function Image(....) where i put the name of my picture that i want to insert and the path to go get it on my computer and there is multiple IF because depending on the value of the cell right under it I want the image to change. The function take the cells that has the formula above in it and put a picture of the same size of that cell in it. The mecanic is quite simple but the programming is way more complicated for me.
So in my Module1 I have this code that i copied from an other thread.
The problem is that when ever i open the file or when i insert an other row in an sheets that doesn't even have any cells with the function in it, i got all the picture from the previous page appearing on the middle on my page (usually the same cells of the page with the function in it in the previous sheets)
I can't work in this files without always having to delete some picture that appears when ever in insert a new row or delete one....
I'm sure there is something wrong with the programming but i don't have the skills to figure it out. This is my first post on the site but i'm not new, i have used a lot of other post to do my work and to fix some other bugs, but i can't find anything about my problem.
When i debug the code, i can see that :
Can anyone help me?
Bookmarks