fredrerik84
Active Member
- Joined
- Feb 26, 2017
- Messages
- 383
Hi I started an quite similar thread earlier today but it was a little confusing so I have a better question this time around.
im working on a code (still on test bench) but here is what I got:
So this works as expected, but Cells(653, 6) already has an img from before. How can I delete this shape before inserting a new one ?
, and the same cell also has a dropdown menu.
anyone know a way to handle this ? would be much appreciated
im working on a code (still on test bench) but here is what I got:
Code:
Sub shape2017()
Dim LogoPath As String
Dim j As Long
Dim ws As Worksheet: Set ws = Worksheets("Data")
j = 51
LogoPath = ThisWorkbook.Path & "\Icons\" & Cells(j, "G") & ".png"
With ActiveSheet.Pictures.Insert(LogoPath)
With .ShapeRange
.LockAspectRatio = False
.Width = 30
.Height = 18
End With
.Left = ActiveSheet.Cells(653, 6).Left + 1
.Top = ActiveSheet.Cells(653, 6).Top - 0.5
.Placement = 1
.PrintObject = True
End With
End Sub
So this works as expected, but Cells(653, 6) already has an img from before. How can I delete this shape before inserting a new one ?
, and the same cell also has a dropdown menu.
anyone know a way to handle this ? would be much appreciated