Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
Hi, All:
I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
on the unneeded option buttons' properties, change "enabled" to
false. then they will be greyed out - visible but not able to be selected. hth susan On Mar 28, 9:19 am, "George" wrote: Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
Why not just offer three options?
"George" wrote: Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks, |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
On Mar 28, 8:23 am, "Susan" wrote:
on the unneeded option buttons' properties, change "enabled" to false. then they will be greyed out - visible but not able to be selected. hth susan On Mar 28, 9:19 am, "George" wrote: Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks,- Hide quoted text - - Show quoted text - Susan: Thanks, but mine is a drop down list (Forms under toolbars). Let me know if you have more ideas. George |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
Why are thetwo "forbidden" options in the list?
Can't you just remove them ? -- Tim Williams Palo Alto, CA "George" wrote in message ups.com... On Mar 28, 8:23 am, "Susan" wrote: on the unneeded option buttons' properties, change "enabled" to false. then they will be greyed out - visible but not able to be selected. hth susan On Mar 28, 9:19 am, "George" wrote: Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks,- Hide quoted text - - Show quoted text - Susan: Thanks, but mine is a drop down list (Forms under toolbars). Let me know if you have more ideas. George |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
On Mar 28, 7:33 pm, "Tim Williams" <timjwilliams at gmail dot com
wrote: Why are thetwo "forbidden" options in the list? Can't you just remove them ? -- Tim Williams Palo Alto, CA "George" wrote in oglegroups.com... On Mar 28, 8:23 am, "Susan" wrote: on the unneeded option buttons' properties, change "enabled" to false. then they will be greyed out - visible but not able to be selected. hth susan On Mar 28, 9:19 am, "George" wrote: Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks,- Hide quoted text - - Show quoted text - Susan: Thanks, but mine is a drop down list (Forms under toolbars). Let me know if you have more ideas. George- Hide quoted text - - Show quoted text - Hi, Palo: Thanks. It is for decoration only! There is no meaning in doing so but I still need it. Thanks again! |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
On Mar 28, 7:43 pm, "George" wrote:
On Mar 28, 7:33 pm, "Tim Williams" <timjwilliams at gmail dot com wrote: Why are thetwo "forbidden" options in the list? Can't you just remove them ? -- Tim Williams Palo Alto, CA "George" wrote in oglegroups.com... On Mar 28, 8:23 am, "Susan" wrote: on the unneeded option buttons' properties, change "enabled" to false. then they will be greyed out - visible but not able to be selected. hth susan On Mar 28, 9:19 am, "George" wrote: Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks,- Hide quoted text - - Show quoted text - Susan: Thanks, but mine is a drop down list (Forms under toolbars). Let me know if you have more ideas. George- Hide quoted text - - Show quoted text - Hi, Palo: Thanks. It is for decoration only! There is no meaning in doing so but I still need it. Thanks again!- Hide quoted text - - Show quoted text - Hi, All: Actually, I just wrote a code as follows. The message is working perfectly. However, if I select either option 3 or option 4 and click "Ok" as the response to the message, either option 3 or option 4 stays. In other words, I would like to go back to the previous option instead of having either option 3 or option 4 selected. Sub DropDown1_Change() Dim iRtn As Integer If ActiveSheet.Range("C4") = 1 Or ActiveSheet.Range("C4") = 2 Or ActiveSheet.Range("C4") = 5 Then ActiveSheet.Range("J4") = ActiveSheet.Range("C4") ' C4 is the index cell of the Form Combo Box Dropdown List If ActiveSheet.Range("C4") = 3 Or ActiveSheet.Range("C4") = 4 Then iRtn = MsgBox("This is for Decoration ONLY. Please DO NOT try to select this option.") If iRtn = True Then ActiveSheet.Range("C4") = ActiveSheet.Range("J4") End If End If End Sub Any more input? Thanks, |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
On Mar 28, 8:55 pm, "George" wrote:
On Mar 28, 7:43 pm, "George" wrote: On Mar 28, 7:33 pm, "Tim Williams" <timjwilliams at gmail dot com wrote: Why are thetwo "forbidden" options in the list? Can't you just remove them ? -- Tim Williams Palo Alto, CA "George" wrote in oglegroups.com... On Mar 28, 8:23 am, "Susan" wrote: on the unneeded option buttons' properties, change "enabled" to false. then they will be greyed out - visible but not able to be selected. hth susan On Mar 28, 9:19 am, "George" wrote: Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks,- Hide quoted text - - Show quoted text - Susan: Thanks, but mine is a drop down list (Forms under toolbars). Let me know if you have more ideas. George- Hide quoted text - - Show quoted text - Hi, Palo: Thanks. It is for decoration only! There is no meaning in doing so but I still need it. Thanks again!- Hide quoted text - - Show quoted text - Hi, All: Actually, I just wrote a code as follows. The message is working perfectly. However, if I select either option 3 or option 4 and click "Ok" as the response to the message, either option 3 or option 4 stays. In other words, I would like to go back to the previous option instead of having either option 3 or option 4 selected. Sub DropDown1_Change() Dim iRtn As Integer If ActiveSheet.Range("C4") = 1 Or ActiveSheet.Range("C4") = 2 Or ActiveSheet.Range("C4") = 5 Then ActiveSheet.Range("J4") = ActiveSheet.Range("C4") ' C4 is the index cell of the Form Combo Box Dropdown List If ActiveSheet.Range("C4") = 3 Or ActiveSheet.Range("C4") = 4 Then iRtn = MsgBox("This is for Decoration ONLY. Please DO NOT try to select this option.") If iRtn = True Then ActiveSheet.Range("C4") = ActiveSheet.Range("J4") End If End If End Sub Any more input? Thanks,- Hide quoted text - - Show quoted text - Ladies and gentlemen: I think I figure it out. The new code is as follows: Sub DropDown1_Change() Dim iRtn As Integer If ActiveSheet.Range("C4") = 1 Or ActiveSheet.Range("C4") = 2 Or ActiveSheet.Range("C4") = 5 Then ActiveSheet.Range("J4") = ActiveSheet.Range("C4") If ActiveSheet.Range("C4") = 3 Or ActiveSheet.Range("C4") = 4 Then iRtn = MsgBox("This is for Decoration ONLY. Please DO NOT try to select this option.", vbOKOnly) If iRtn = 1 Then ActiveSheet.Range("C4") = ActiveSheet.Range("J4") End If End If End Sub Thanks, |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re-post
George,
As others have stated, it is rather confusing to the user (and unusual Windows design) to offer options that are not valid. If these are some kind of separator, then maybe a change of design (option/check boxes) would be more appropriate. However, I would use a combobox from the Controls Tools box and then you can use it's properties (.ListIndex etc) to see what was selected and reset if required. NickHK "George" wrote in message ups.com... Hi, All: I have a Form Combo Box which has 5 options. The default option is either Option1, Option2 or Option 5. If the user switches between those 3 options, we do NOT need to do anything. However, if the user wants to switch from the default option (1, 2 or 5) to EITHER Option 3 OR Option4, I will need a warning message "This is for decoration ONLY. Please DO NOT attempt to select this. Thanks,". Then the user will click "Ok" and the option stays as the previous one. Any help will be highly appeciated! Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Post | Excel Worksheet Functions | |||
will this post | Excel Discussion (Misc queries) | |||
Should I generally request "post a poll" when I post a new thread? | Excel Discussion (Misc queries) | |||
My First Post! | Excel Discussion (Misc queries) | |||
VBA Post | Excel Programming |