Hi,
Some time ago I added a macro to a single page worksheet (called Design). It causes excel pictures to turn on (or off) depending on the contents of a cell. (See below for macro). My problem is that if I have two or more worksheets open at once which contain this macro, then changing one worksheet affects all the others as well! I need each worksheet to be independent. How can I achieve this? Is the macro stored in the wrong place? (It's stored in Sheet 1 (Design) at present).
Private Sub Worksheet_Calculate()
If ActiveSheet.Range("F64") = "S" Or ActiveSheet.Range("F64") = "s" Then
Shapes("Picture 2").Visible = False
Shapes("Picture 1").Visible = True
End If
If ActiveSheet.Range("F64") = "D" Or ActiveSheet.Range("F64") = "d" Then
Shapes("Picture 1").Visible = False
Shapes("Picture 2").Visible = True
End If
If ActiveSheet.Range("H72") = "No Stiffeners Required" Then
Shapes("Picture 3").Visible = True
Else
Shapes("Picture 3").Visible = False
End If
End Sub
Some time ago I added a macro to a single page worksheet (called Design). It causes excel pictures to turn on (or off) depending on the contents of a cell. (See below for macro). My problem is that if I have two or more worksheets open at once which contain this macro, then changing one worksheet affects all the others as well! I need each worksheet to be independent. How can I achieve this? Is the macro stored in the wrong place? (It's stored in Sheet 1 (Design) at present).
Private Sub Worksheet_Calculate()
If ActiveSheet.Range("F64") = "S" Or ActiveSheet.Range("F64") = "s" Then
Shapes("Picture 2").Visible = False
Shapes("Picture 1").Visible = True
End If
If ActiveSheet.Range("F64") = "D" Or ActiveSheet.Range("F64") = "d" Then
Shapes("Picture 1").Visible = False
Shapes("Picture 2").Visible = True
End If
If ActiveSheet.Range("H72") = "No Stiffeners Required" Then
Shapes("Picture 3").Visible = True
Else
Shapes("Picture 3").Visible = False
End If
End Sub