If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
autosize a picture to a cell
|
#2
|
|||
|
|||
autosize a picture to a cell
Hi
This will add a picture in the activecell Post back with more textg if you need something else Sub test() On Error Resume Next Set pic = ActiveSheet.Pictures.Insert("C:\range.gif") On Error GoTo 0 If Not pic Is Nothing Then 'The picture exists Set rng = ActiveCell With pic .Height = rng.Height .Width = rng.Width .Left = rng.Left .Top = rng.Top End With End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "david p" wrote in message ... |
Thread Tools | |
Display Modes | |
|
|