Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / September 2005

Tip: Looking for answers? Try searching our database.

radio button help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tjb - 27 Sep 2005 14:52 GMT
What I want is if the radio button (named "VolorInvol") is selected, it
performs the formula in the cell, if the radio button is not marked I want
the cell to be blank.  Here's my code but it doesn't work, what am I doing
wrong?

There are several other radio buttons in this same group so a checkbox won't
work for this situation.

Private Sub VolorInvol_Click()
   If VolorInvol.Value = True Then
       Range("B14").Formula = "=DATE(YEAR(EVENT),MONTH(EVENT)+1,0)"
   Else
       Range("B14").Value = ""
   End If
End Sub
Rowan - 27 Sep 2005 23:51 GMT
Hi

Did you not see my earlier reply?

What you are doing wrong is that the event (macro) you have here will
only run when the radio button VolorInvol is clicked. Clicking a radio
button "turns is on" making its vba value True. Therefore you code can
only ever enter the formula in B14. It will never remove the formula.

You need to add the line of code:
Range("B14").Value = ""
to the click event for all the other buttons in order to remove the
formula from B14 when VolorInvol is not checked.

Regards
Rowan

> What I want is if the radio button (named "VolorInvol") is selected, it
> performs the formula in the cell, if the radio button is not marked I want
[quoted text clipped - 11 lines]
>     End If
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.