ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Re-post (https://www.excelbanter.com/excel-programming/386362-re-post.html)

George

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,


Susan

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,




JLGWhiz

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,



George

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


Tim Williams

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




George

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!


George

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,


George

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,


NickHK

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,





All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com