Do you know how should I modify this code for uploaded picture to be scaled with locked aspect ratio for full width of merged cells?Please Login or Register to view this content.
Do you know how should I modify this code for uploaded picture to be scaled with locked aspect ratio for full width of merged cells?Please Login or Register to view this content.
Hi,
Delete these lines :
RegardsPlease Login or Register to view this content.
1. I care dog
2. I am a loop maniac
3. Forum rules link : Click here
3.33. Don't forget to mark the thread as solved, this is important
Thanks Karedog
Actually the code is simpler, but picture is not scaled to full width of merged cells.
I wonder about center and middle allign to full width for the graph. Do you perhaps know how to modify code?
Please Login or Register to view this content.
Is this a picture or a graph ? You can't use your macro above for graphs.
Please upload a sample file to clarify it.
So here you can find button Upload Picture. When clicked, you run two macros:
- Insert Picture, and
- Position and Scale Picture
20141117 generator procesów.xlsm
I find that the code at post #3 already fulfill your wish, that is "full width of merged cells ", of course since this code is keeping the aspect ratio (the pic will not distort), the height of pic will vary, either smaller or bigger than cell height. Here is the sample pic : Keep aspect ratio
But if you want the whole cell is covered with the pic (this mean sacrifice the "keep aspect ratio"), then this is the code :
The sample pic : Full - distortedPlease Login or Register to view this content.
Thank you,
It works great for height. However, is it possible to fit picture in frames of merged cells with aspect ratio excluded?
wizualizacja.jpg
Your picture is not showed up, I get an error : "The image http://www.excelforum.com/attachment...zualizacja.jpg cannot be displayed because it contains errors."
BTW, the code at post #6 already "exclude aspect ratio".
What I mean is auto-fit to right of merged cells - http://www.opendrive.com/files/OF81O...zualizacja.jpg
I just realize that for Excel 2007++ the aspect ratio is default to locked (previously I tried to run using Excel 2003, and its default is not to locked).
Here is the code to disable aspect ratio :
Please Login or Register to view this content.
Works perfect!
Thank you for your help and time.
Regards,
Marcin Krawczynski
You are welcome Marcin, and please mark this thread as SOLVED, thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks