nmgmarques
Board Regular
- Joined
- Mar 1, 2011
- Messages
- 133
- Office Version
- 365
- Platform
- 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 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!