Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically resize a picture to a cell
How can I automatically resize a picture to a cell of preset width &
height? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically resize a picture to a cell
Why? A cell can not contain a picture.
John "Gpompidou" wrote in message ... How can I automatically resize a picture to a cell of preset width & height? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically resize a picture to a cell
I use this to add a picture. Maybe you can pick out the pieces you need:
Option Explicit Sub testme01() Dim myPict As Picture Dim myPictName As String myPictName = "C:\test.jpg" With ActiveSheet With .Range("a1:b9") Set myPict = .Parent.Pictures.Insert(Filename:=myPictName) myPict.Top = .Top myPict.Left = .Left myPict.Width = .Width myPict.Height = .Height myPict.Name = "Pict_" & .Cells(1).Address(0, 0) End With End With End Sub I'm not sure if you want to fix the .width or the .height, though. Manually, you could adjust its size/position by holding down the Alt key and using the grab handles. The picture will snap-to the edges of the cells. Gpompidou wrote: How can I automatically resize a picture to a cell of preset width & height? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Resize cell to fit picture | Excel Discussion (Misc queries) | |||
Can you use a formula to automatically display a picture in a cell | Excel Worksheet Functions | |||
Set up menu to resize picture upon right click | Excel Discussion (Misc queries) | |||
please help! Linking a picture to a cell and recalculating automatically | Excel Discussion (Misc queries) | |||
How to insert picture and automatically size to cell? | Excel Worksheet Functions |