c_skytte
03-14-2022, 06:36 AM
Hi,
First of all;
In a VBA worksheet i have defined 4 cells by the names: Picture1, Picture2, Picture3 and Picture4.
In a folder I have 10 pictures, all JPG.
I'd like to take the first 4 pictures from that folder and place in the cells Picture1, Picture2, Picture3 and Picture4 (the names of the imported pictures may vary).
The pictures have to fit the cell by import (I guess imageWidth As Double and imageHeight as Double could be used, but i just can't figure it out!) which means the cell can't get any bigger height/width by import.
By import the pictures should be centered in the cell.
Secondly;
If the folder one day contain 0 pictures the import should be skipped, but if only 2 pictures are placed in the folder; the cells Picture3 and 4, should be left empty.
Thanks!
First of all;
In a VBA worksheet i have defined 4 cells by the names: Picture1, Picture2, Picture3 and Picture4.
In a folder I have 10 pictures, all JPG.
I'd like to take the first 4 pictures from that folder and place in the cells Picture1, Picture2, Picture3 and Picture4 (the names of the imported pictures may vary).
The pictures have to fit the cell by import (I guess imageWidth As Double and imageHeight as Double could be used, but i just can't figure it out!) which means the cell can't get any bigger height/width by import.
By import the pictures should be centered in the cell.
Secondly;
If the folder one day contain 0 pictures the import should be skipped, but if only 2 pictures are placed in the folder; the cells Picture3 and 4, should be left empty.
Thanks!