2003 / 2007 Compatibility Display Picture on Cell Value

kingpin1984

New Member
Joined
Jan 14, 2013
Messages
5
Hi There,

I have written some code in vba which works brilliantly on my excel version however, when excel is opened in 2003 the picture functionality no longer works.

What I want is for the pictures to be displayed depending on the cell value. Is there something I need to do to enable this to work in excel 2003 as well as 2007?

Code:
Private Sub Worksheet_Change(ByVal Target As Range)</SPAN>
 
ActiveSheet.Shapes("I1").Visible = False</SPAN>
ActiveSheet.Shapes("IR1").Visible = False</SPAN>
ActiveSheet.Shapes("F1").Visible = False</SPAN>
ActiveSheet.Shapes("E1").Visible = False</SPAN>
ActiveSheet.Shapes("W1").Visible = False</SPAN>
ActiveSheet.Shapes("S1").Visible = False</SPAN>
 
If Range("N4") = "England" Then ActiveSheet.Shapes("E1").Visible = True</SPAN>
If Range("N4") = "France" Then ActiveSheet.Shapes("F1").Visible = True</SPAN>
If Range("N4") = "Ireland" Then ActiveSheet.Shapes("IR1").Visible = True</SPAN>
If Range("N4") = "Wales" Then ActiveSheet.Shapes("W1").Visible = True</SPAN>
If Range("N4") = "Italy" Then ActiveSheet.Shapes("I1").Visible = True</SPAN>
If Range("N4") = "Scotland" Then ActiveSheet.Shapes("S1").Visible = True</SPAN>
 
End Sub</SPAN>

Thanks for reading!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Are you sure that the event is firing? Put a MsgBox in there to check.

Yes it is working fine but then again I am currently working with a newer version of excel. If it helps, when I save the document I get this message from the compatability check:

"This object will no longer be editable. Location: Myworksheet, Shapes"

Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top