ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do i select an inserted image. (https://www.excelbanter.com/excel-programming/423679-how-do-i-select-inserted-image.html)

SpeeD

How do i select an inserted image.
 
Ho i´ve inserted an image in excel, but i need to make some ajustements
(position) as some columns are hidden or not...

How do i select in VBA an allready inserted image? (embeded)
i ned to do the folowing.... (but doenst work)

Dim myPict As Picture
With ActiveSheet.Range("p2")
Set myPict = ActiveSheet.Shapes("Picture18")
myPict.Top = .Top
myPict.Left = .Left - 50
myPict.Placement = xlMove

End With


Patrick Molloy[_2_]

How do i select an inserted image.
 
my demo:

Sub MoveIt()
Dim oPic As Shape

If ActiveSheet.Shapes.Count = 1 Then
Set oPic = ActiveSheet.Shapes(1)
With oPic
.Top = 0
.Left = 50
End With
End If
End Sub

"SpeeD" wrote:

Ho i´ve inserted an image in excel, but i need to make some ajustements
(position) as some columns are hidden or not...

How do i select in VBA an allready inserted image? (embeded)
i ned to do the folowing.... (but doenst work)

Dim myPict As Picture
With ActiveSheet.Range("p2")
Set myPict = ActiveSheet.Shapes("Picture18")
myPict.Top = .Top
myPict.Left = .Left - 50
myPict.Placement = xlMove

End With



All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com