Inserting photo to a pre-determined size
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Inserting photo to a pre-determined size
What I’m trying to achieve is being able to insert a photo into a selected cell. The photo must be a pre-determined size, the reason for this is the cell selection to be used to insert photo will be able to expand its height to accommodate additional photos if needed. I know I could just insert an additional row, but the problem there is too much info below that will be effect by inserting a row. I attached a workbook that may better explain.
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Re: Inserting photo to a pre-determined size
Hi Hans
I noticed with the code that I have when selecting different photos that are of different sizes it can change the size of inserted photo. I was hoping to come up with an absolute size for all selected photo. This way I could adjust the setting as to fit selected cell, then if additional photos are needed I could expand cell using check box.
I noticed with the code that I have when selecting different photos that are of different sizes it can change the size of inserted photo. I was hoping to come up with an absolute size for all selected photo. This way I could adjust the setting as to fit selected cell, then if additional photos are needed I could expand cell using check box.
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Inserting photo to a pre-determined size
The pictures that the user inserts can have different aspect ratios - some could be landscape, other portrait, and yet others square.
Do you want to fix the height of the inserted pictures and let the width vary?
Or do you want to fix the width and let the height vary?
Or do you want to fix both (causing the pictures to be distorted)?
Or something else?
Do you want to fix the height of the inserted pictures and let the width vary?
Or do you want to fix the width and let the height vary?
Or do you want to fix both (causing the pictures to be distorted)?
Or something else?
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Re: Inserting photo to a pre-determined size
Hi Hans
I like option 1, fix the height of the inserted pictures and let the width
vary.
I like option 1, fix the height of the inserted pictures and let the width
vary.
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Inserting photo to a pre-determined size
Simply remove the line
from your code.
Code: Select all
.Width = 27
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Re: Inserting photo to a pre-determined size
I first removed the Width as you suggested and then added various photos while changing the height dimensions until I achieved a satisfied height. It’s not perfect but it will work
Thank you Hans
Thank you Hans