Making frames stay hidden or seen

G

Guest

I am using a code to make the correct frames visible or hidden depending on a
checkbox that is checked. So far, the code works on the senders end, but
once I send the email to myself, the frames do not act accordingly. I either
see all the frames or none of them, depending on what I make the visible
status on the properties menu. The code I am using is below - Will someone
please tell me what I am missing or why this won't work and how to fix it?

Sub Item_CustomPropertyChange(ByVal Name)
Select Case Name
Case "ITTicketVisible"
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Frame4 = myPage1.Controls("Frame4")
Frame4.Visible = Item.UserProperties("ITTicketVisible")
End Select
Select Case Name
Case "ReturnResponseVisible"
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Frame3 = myPage1.Controls("Frame3")
Frame3.Visible = Item.UserProperties("ReturnResponseVisible")
End Select
Select Case Name
Case "LockoutResponseVisible"
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Frame2 = myPage1.Controls("Frame2")
Frame2.Visible = Item.UserProperties("LockoutResponseVisible")
End Select
End Sub

Function Item_Open()
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Frame1 = myPage1.Controls("Frame1")
Frame1.Visible = Item.UserProperties("ITTicketVisible")
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Frame2 = myPage1.Controls("Frame2")
Frame2.Visible = Item.UserProperties("ReturnResponseVisible")
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Frame3 = myPage1.Controls("Frame3")
Frame3.Visible = Item.UserProperties("LockoutResponseVisible")
End Function
 
G

Guest

I have made this code work - I had to tweak the code and write for the Read
event instead of the open event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top