![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi Everyone,
How do you code to make a frame within a form visible/hidden. I've composed a code that when a user selects the form a message box opens asking them if they would like to do this or that (if they answer THIS then Frame A is visible.....if they answer That then Frame B is visible)...bottomline both cannot be visible at the same time. Please help.... Function Item_Open() IntAns=MsgBox("Would you like to open a new account",_ vbQuestion+vbYesNo,"Account Request") If IntAns=vbYes then Set fraAcctOpen.Visible=True Else If IntAns=vbNo then Set fraAcctChange.Visible=True End If End If End Function I realize there is something wrong with this code since i get the question but when you reply well both frames appear which isn't correct. If anyone can offer me any guidance I'd greatly appreciate it. Regards, Jade |
#2
|
|||
|
|||
![]()
You must properly reference the controls, based on which custom page they
live on. See http://www.outlookcode.com/d/propsyntax.htm -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Jade" wrote in message oups.com... Hi Everyone, How do you code to make a frame within a form visible/hidden. I've composed a code that when a user selects the form a message box opens asking them if they would like to do this or that (if they answer THIS then Frame A is visible.....if they answer That then Frame B is visible)...bottomline both cannot be visible at the same time. Please help.... Function Item_Open() IntAns=MsgBox("Would you like to open a new account",_ vbQuestion+vbYesNo,"Account Request") If IntAns=vbYes then Set fraAcctOpen.Visible=True Else If IntAns=vbNo then Set fraAcctChange.Visible=True End If End If End Function I realize there is something wrong with this code since i get the question but when you reply well both frames appear which isn't correct. If anyone can offer me any guidance I'd greatly appreciate it. Regards, Jade |
#3
|
|||
|
|||
![]()
Hi Ken,
ok...tried this Function Item_Open() Set myInspector=Item.GetInspector Set myPage1=myInspector.ModifiedFormPages("Customer Number Request") Set fraAcctChange=myPage1.Controls("fraAcctChange") IntAns=MsgBox("Would you like to open a new account",_ vbQuestion+vbYesNo,"Account Request") If IntAns=vbYes then fraAcctChange.Visible=True Else strMsg="Hello" End If End Function not having much luck...help...please |
#4
|
|||
|
|||
![]()
What's not working? Do you get the message box?
If you step the code do you get the intermediate Inspector object and ModifiedFormPages collection and the final frame control? You can also put in MsgBox statements for troubleshooting: MsgBox myInspector.Caption MsgBox myInspector.ModifiedFormPages.Count MsgBox myPage1.Caption MsgBox fraAcctChange.Caption See where you're losing things. Also, just a shot, but see if using explicit Item properties instead of relying on the default property works any better: Set myPage1=myInspector.ModifiedFormPages.Item("Custom er Number Request") Set fraAcctChange=myPage1.Controls.Item("fraAcctChange ") -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Jade" wrote in message oups.com... Hi Ken, ok...tried this Function Item_Open() Set myInspector=Item.GetInspector Set myPage1=myInspector.ModifiedFormPages("Customer Number Request") Set fraAcctChange=myPage1.Controls("fraAcctChange") IntAns=MsgBox("Would you like to open a new account",_ vbQuestion+vbYesNo,"Account Request") If IntAns=vbYes then fraAcctChange.Visible=True Else strMsg="Hello" End If End Function not having much luck...help...please |
#5
|
|||
|
|||
![]()
Hi Ken,
You must have wings on your back because you're definitely an ANGEL...thank you for the troubleshooting statements...it was all I needed to discover the problem. Form is working fabulously. Thanks!!!! Jade |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
An Easy Question: How to get a "msgbox" to display? | Bernie | Outlook and VBA | 2 | March 30th 06 09:55 PM |
An Easy Question: How to get a "msgbox" to display? | Bernie | Outlook and VBA | 0 | March 29th 06 11:19 PM |
OE question | Bobby28 | Outlook - Installation | 0 | March 27th 06 11:17 PM |
How can I suppress annoying msgbox "enter network password"? | maysider | Outlook - Installation | 2 | February 16th 06 03:04 AM |
question | manish goyal | Outlook and VBA | 1 | January 21st 06 10:09 AM |