0

I built a User Form where there is a post-select configuration that depending on choices shows an image and text results.

I uploaded the pictures from a cell where the image PATH is written to a picture box.

Image1.Picture = LoadPicture (Sheets ("XXX"). Cells (34, 5))

I have two problems:

  1. The image is loaded upside down. I tried to find a ROTATE command, tried to make the image 180 degrees in a folder in advance, even tried to upload it to picture box directly one by one and the same problem. How can I make it rotate 180 degrees?

  2. I sent the file to my co-workers and they were able to open the User Form, but when they clicked the SHOW button an error occurred that says the PATH was not found. I guess it is because the image is in a folder only on my computer. How can I put it in a shared folder and make PATH relevant to everyone (assuming there is a different USER for each computer)?

Community
  • 1
  • 1
Raz Aimt
  • 1
  • 1

1 Answers1

0

Regarding your first problem, there is a way of rotating images with vba code but it might be easier to just rotate it in advance so it gets displayed correctly. See this post for more info.

Your second problem can be solved in multiple ways, you could include the images in the workbook and load it from there, but if you don't like that, you can specify the path dynamically. Of course you have to provide your co workers with the image files aswell in this case. If the images are stored in the same folder as the excel file you can use

Application.ActiveWorkbook.Path

to dynamically find the path of the excel file, which would then also be the path of the image. You can also store the image in a subfolder in the folder of the excel file and create that path like this:

path=Application.ActiveWorkbook.Path & "\subfoldername"
GWD
  • 3,081
  • 14
  • 30