Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This code came from andrew poulsom at mr excel.com but the site froze so i am
continuing here. Th following does all i ask except the image is still down to row 4. I only want the image in A1:F1 after i resize and merge that range to the size I want the image to fit in. Sub Test() '***Change to suit Const PicName As String = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Picture1.jpg" Dim Pic As Object Set Pic = ActiveSheet.Pictures.Insert(PicName) With Pic .Top = Range("A1").Top .Left = Range("A1").Left .Height = Range("A1").RowHeight ', still is down to row 4 .Width = Range("A1:F1").Width End With End Sub thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can't resize a row and expect the picture size to change. Pictures sit
ontop of the worksheet and is not part of the cell structure. Either you have to resize the rows before you put the pictures on the worksheet, or resize the rows after you place the pictures on the worksheet to fit the picture. "thomas donino" wrote: This code came from andrew poulsom at mr excel.com but the site froze so i am continuing here. Th following does all i ask except the image is still down to row 4. I only want the image in A1:F1 after i resize and merge that range to the size I want the image to fit in. Sub Test() '***Change to suit Const PicName As String = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Picture1.jpg" Dim Pic As Object Set Pic = ActiveSheet.Pictures.Insert(PicName) With Pic .Top = Range("A1").Top .Left = Range("A1").Left .Height = Range("A1").RowHeight ', still is down to row 4 .Width = Range("A1:F1").Width End With End Sub thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Image or Picture from SQL Image Data Type | Excel Programming | |||
Andy Pope's button image editor; pasting icons to sheet then toolbar- why does image quality degrade? | Excel Programming | |||
Is there any way to search image of my local drive with Image name or Image Title, Description | Excel Programming | |||
VBA to display image on a form - image is defined in Range Name | Excel Programming | |||
Export the worksheet background image as an image file - possible? | Excel Programming |