VISHAL120
08-21-2011, 10:01 PM
I have actually this program which is working well when i searches for the shapes to be place on the cell.
The problem am having actually is i have not been able to program the deletion of the shapes before placing another one on the cell.
the user will select a day and the shape need to pe place on the defined cell.
and for other day the first shape shall be removed and the concern shape need to place and this goes on like this.
the user can select any day.
and also is there a posibility to place the concern code on the worksheet selection change event.
thanks in advance for the kind help.
please find attached the file for better idea and also copy of the code. :
Sub MY_data()
days_selection = Range("Day_Selection")
Select Case days_selection
Case 1
ActiveSheet.Shapes("Quad Arrow 1").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 2
ActiveSheet.Shapes("Bent-Up Arrow 2").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 3
ActiveSheet.Shapes("AutoShape 18").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 4
ActiveSheet.Shapes("Down Arrow 4").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 5
ActiveSheet.Shapes("12-Point Star 5").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
End Select
End Sub
The problem am having actually is i have not been able to program the deletion of the shapes before placing another one on the cell.
the user will select a day and the shape need to pe place on the defined cell.
and for other day the first shape shall be removed and the concern shape need to place and this goes on like this.
the user can select any day.
and also is there a posibility to place the concern code on the worksheet selection change event.
thanks in advance for the kind help.
please find attached the file for better idea and also copy of the code. :
Sub MY_data()
days_selection = Range("Day_Selection")
Select Case days_selection
Case 1
ActiveSheet.Shapes("Quad Arrow 1").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 2
ActiveSheet.Shapes("Bent-Up Arrow 2").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 3
ActiveSheet.Shapes("AutoShape 18").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 4
ActiveSheet.Shapes("Down Arrow 4").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
Case 5
ActiveSheet.Shapes("12-Point Star 5").Select
Selection.Copy
Range("days_Cells").Select
ActiveSheet.PasteSpecial Format:="Picture (PNG)", Link:=False, _
DisplayAsIcon:=False
End Select
End Sub