R
Richard1284
Hi all,
Thanks for your help so far however I am still stumped.
I have 4 cmdButtons, As each one is clicked I want a new picture t
come up(this is ok) HOWEVER i also want to delete the old pictur
already on the sheet(this is my problem). I have declared some global
and have tried to store the active sheet Picture in a cell, Have a loo
at my code....it is almost there but not quite, any ideas on how t
improve this.....
---------------------------------------------------
Public myPic As Picture '
Public sPic As String
Sub InsertPic1()
sPic = Sheets("Main").Cells(100, 6).Value
If sPic <> "" Then
Set myPic = ActiveSheet.Pictures(sPic)
myPic.Delete
End If
sPic = ("F:\Dss\ass\Arran1.jpg")
Sheets("Main").Select
Range("D16").Select
Set myPic = ActiveSheet.Pictures.Insert(sPic)
Sheets("Main").Cells(100, 6).Value = sPi
Thanks for your help so far however I am still stumped.
I have 4 cmdButtons, As each one is clicked I want a new picture t
come up(this is ok) HOWEVER i also want to delete the old pictur
already on the sheet(this is my problem). I have declared some global
and have tried to store the active sheet Picture in a cell, Have a loo
at my code....it is almost there but not quite, any ideas on how t
improve this.....
---------------------------------------------------
Public myPic As Picture '
Public sPic As String
Sub InsertPic1()
sPic = Sheets("Main").Cells(100, 6).Value
If sPic <> "" Then
Set myPic = ActiveSheet.Pictures(sPic)
myPic.Delete
End If
sPic = ("F:\Dss\ass\Arran1.jpg")
Sheets("Main").Select
Range("D16").Select
Set myPic = ActiveSheet.Pictures.Insert(sPic)
Sheets("Main").Cells(100, 6).Value = sPi