Re-post

G

George

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,
 
S

Susan

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
 
G

George

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







- Show quoted text -

Susan:

Thanks, but mine is a drop down list (Forms under toolbars).

Let me know if you have more ideas.

George
 
G

George

Why are thetwo "forbidden" options in the list?
Can't you just remove them ?

--
Tim Williams
Palo Alto, CA







- 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!
 
G

George

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,
 
G

George

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,
 
N

NickHK

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
 

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