LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Remove an inserted picture

The code below inserts picture if a condition is met. My question is, is
there any way to remove the picture if the condition no longer exists?


Sub InsertHoliday()
Dim myPict As Picture
Dim rng

On Error GoTo Error


If range("B58").Value < "" Then
Set rng = range("B18")
End If

If range("C58").Value < "" Then
Set rng = range("C18")
End If

If range("D58").Value < "" Then
Set rng = range("G18")
End If


If range("F1") = "No Picture" Then GoTo NoPicture


With rng
Set myPict = .Parent.Pictures.Insert("C:\Users\Owner\Desktop\Ne w
Years Large.gif")
myPict.Top = .Top
myPict.Left = .Left
End With

Error:

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I associate an inserted picture with its row? [email protected] Excel Discussion (Misc queries) 1 October 22nd 09 07:22 AM
Printing the inserted picture Wildan Excel Discussion (Misc queries) 0 December 13th 06 03:10 PM
Picture inserted onto my spreadsheet will not print Jordan Excel Programming 3 August 29th 06 02:01 PM
Inserted picture name DaveJones Excel Programming 7 December 8th 05 02:36 PM
picture 34 was inserted by excel? sophy2 Excel Discussion (Misc queries) 1 October 6th 05 02:23 PM


All times are GMT +1. The time now is 08:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"