Sheet won't update due to image file

nmgmarques

Board Regular
Joined
Mar 1, 2011
Messages
133
Office Version
  1. 365
Platform
  1. Windows
Hi folks! Bare with me. This one's a bit lengthy.

Excel file (with macros) and images can be found in this pack:
https://dl.dropbox.com/u/3031017/Peças.zip

Upon opening the file, first, you'll have to open VB, select module ImportPictures and change the myPath value in Sub ImportMaterialPictures() to the path you extracted the files or pictures (in my case myPath = "D:\Temp\").

Now on the first Worksheet, "Impressão das Etiquetas", you can change Nº Material, Local no Armazêm and Quantidade. Changing the first, Nº de Material, the picture frame to the right gets updated to the image corresponding to the material number given. Also, the worksheets K1, K2, K3, K4 and Etiq are also updated. The K's with texts, numbers and images, the latter with only the texts and numbers.
So if I type in 36200101 I should see a metallic filter on all my worksheets except the last two, and the texts should update.

Basically my script checks the material number and then populates the ranges with "number.png". For those material numbers that don't have a picture yet, my script points to no_img.png. This is all fine and dandy, as long as the material number I type in next gets a picture other than the one that was already in place.

For example, if I type in 36200002 followed by 37270201 and then 37270401, all the sheets are being updated with images and text.

If after this I type in 37250401 (number without picture) it is also good. The no_img.png file gets loaded the first time and the cells on the sheets also get updated. But if I now type in 37250501 (another number without picture) the cells on the sheets are no longer updating. I am guessing it has something to do with the fact that I am loading the same image again because if I now type in a different number that does have an image, the sheets all update again and so forth, until I hit another sequence that loads the no_img file more than once.

Any ideas how to get past this?

Help much appreciated! Thanks in advance!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,203,269
Messages
6,054,482
Members
444,727
Latest member
Mayank Sharma

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