Hi there, I'm new to the forum and to VBA.
I have a multi-row ,multi-column spreadsheet which lists furniture items, and with some plain Excel formulas allows me to create a proper list.
I'm using Excel as a database, in Sheet1 I have all the data, and Sheet2 is actually where I select the data and set the list of the chosen items.
Now, I have the images for all the items listed in Sheet1 in the same folder of the xlsm file, and I want to insert the proper image in a given cell in the given row.
Looking for something which may do the trick I did find this code in your site and it actually works for me!
Now, what I need is to provide the PictureFileName and TargetCell via parameters already present in the spreadsheet.
Say I want to retrieve the image shelves.jpg which is in the folder DATABASE\imgs\ in your code mentioned above I manually set the string for PictureFileName like this
and say I want to put the image in D10 I indicate
.
Well, I did find another loop code on the net which sets my row value to 1 and increase it by 1 after each insert picture until the cell on the 2nd column is null.
Now say that I have in each row, on column K the image name, and on column L the path I tried to retrieve the whole path like this:
The whole code I set up is this below
I guess the problem is that the full image path string is not correct, because I tried it in the Immediate and it gives me null, while manually works fine.
Any help would be greatly appreciated.
P
Bookmarks