Solved

option button

Posted on 2001-08-15
14
163 Views
Last Modified: 2010-05-02
Hi,

When i choose (click) an option button and after that  make it invisible , when i return it visible back i find it still black (as chosed ) but it is on lost focus
how can i make it clear after finish using it ?

Thanks
0
Comment
Question by:Shoushou
  • 6
  • 2
  • 2
  • +2
14 Comments
 
LVL 8

Accepted Solution

by:
DennisBorg earned 15 total points
Comment Utility
Set the value of that option button to zero (0)


   Option1.Value = 0



-Dennis Borg
0
 
LVL 3

Expert Comment

by:czpczp
Comment Utility
Private Sub Command1_Click()
    Command1.Visible = False
End Sub
0
 
LVL 3

Expert Comment

by:czpczp
Comment Utility
Ooops, I thought you said command button
0
 
LVL 1

Expert Comment

by:vim_asteya
Comment Utility
Same as that of DennisBorg
option1.value=false
0
 

Author Comment

by:Shoushou
Comment Utility
Hi Sirs,

I tried the answer : option1.Value = 0 (false)
but i still have the same problem .

Thanks
Shoushou
0
 
LVL 1

Expert Comment

by:vim_asteya
Comment Utility
Private Sub Form_Click()
Option1.Visible = True
Option1.Value = False
End Sub

Private Sub Option1_Click()
Option1.Visible = False
End Sub

I checked using the above code.
If this isnt what u want,pls get back to me
0
 
LVL 8

Expert Comment

by:DennisBorg
Comment Utility
Shoushou:

>I tried the answer : option1.Value = 0 (false)
>but i still have the same problem .

That line of code will work as far as unselecting that option button.

One thing to remember, is that if that option button gets the focus, its value will be changed and it will then be selected (i.e. that black dot)

Is that option button getting the focus after you deselect it by setting the value property to 0?


-Dennis Borg
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 8

Expert Comment

by:DennisBorg
Comment Utility
Please show us the pertinent code, and we can probably help you better.
0
 

Author Comment

by:Shoushou
Comment Utility
Dear Sirs,

Thanks for your help , i discovered my mistake , it is like tht :

i make those option buttons as array then i should type this code

option1(0).value = 0
option1(1).value = 0

not to make the code as follow

option1.value = 0

Bye
Shoushou
0
 
LVL 8

Expert Comment

by:DennisBorg
Comment Utility
I had no idea you were using a control array.

The following comment of yours:

>I tried the answer : option1.Value = 0 (false)
>but i still have the same problem .

You should have told us that you got an error, instead of it not working.

The knowledge that you got an error, and what it's message was (in this case "Compile Error: Method or Data Member not found") would have been very helpful in troubleshooting your problem.

Glad you got it working now.

How do you intend on closing this question?


-Dennis Borg
0
 
LVL 3

Expert Comment

by:modder
Comment Utility
the asamir00 and Shoushou accounts were duplicates and have been closed.

Please advise as to how points should be awarded

modder
Community Support Admin
0
 
LVL 8

Expert Comment

by:DennisBorg
Comment Utility
Modder:

In this case, I would suggest that my first reply answered the question.

It was later brought out that a control array was being used, which did not change the answer, but rather changed how to implement that answer.

I feel that my answer(s) deserve the credit for this question.

-Dennis Borg
0
 
LVL 3

Expert Comment

by:modder
Comment Utility
OK
0
 
LVL 8

Expert Comment

by:DennisBorg
Comment Utility
Thank you modder!   I appreciate all your hard work on keeping these message boards cleaned up.  :-)


-Dennis Borg
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now