This is going to be difficult for me to describe so if please let me know if any clarification is required.
I have an image in a frame on a userform. I want to be able to:
- click on the image to zoom in
- to zoom out, I click on the image again (In other words, a left click works as a toggle. If image is already zoomed in, it will revert to full size. If image is currently displayed full size, it will zoom in)
- While I am zoomed into the image, I want to be able "grab" the image by holding down left click and, while grabbing, "pan" the image around. (So that a different section of the image is visible inside the frame)
The first two objectives are easy. But I am stuck on the last one. Can anybody help?
The closest to what I am looking for is Andy Pope's brilliant Magnify Image (see https://www.andypope.info/vba/magnifyimage.htm) The difference is that his has a 2nd image which acts as a magnifying glass on top of the first image. Whereas I want to zoom into the same image and then pan it around inside its frame.
Bookmarks