Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi!
I am using Mathcad 15 and Excel 2013.
I need help regarding this. This problem is only illustrative of the one I want to solve.
Suppose that I have a Mathcad file wherein I am embedding an Excel Component. (See attachment).
Say if the value of Cell A1 is not "Happy", Picture 1 will be hidden. It will be shown otherwise.
Normally, it would be easy to do this in Excel. The code would be:
Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(1, 1).Value = "Happy" Then
ActiveSheet.Pictures("Picture 1").Visible = True
Else
ActiveSheet.Pictures("Picture 1").Visible = False
End If
End Sub
Now, I am trying to make this code run inside the Mathcad embedded excel file by coding it there. However, I am confronted with the error:
I am thinking that maybe I cannot refer to the embedded sheet as simply "Activesheet."
Can anyone help me sort this out?
Thank you very much!
Try Shapes("Picture 1").Visible = True/False instead (note no dot preceding 'Shapes').
Stuart