Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default i need a "radio button" -like feature in excel

I need to be able to click the cell and an "X" will appear or disappear. A
radio button would work, too.

Any help?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default i need a "radio button" -like feature in excel

How about a double click event?

Try this macro.

Select the sheet where you want this to happen.
Right click on the sheet tab and select View Code
Paste this code into the right side of the window that opens:

Option Explicit

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1")) Is Nothing Then
With Target
If .Value = "X" Then
.Value = ""
Else: .Value = "X"
End If
End With
Cancel = True
End If
sub_exit:
Application.EnableEvents = True
End Sub

Hit ALT Q or click on the "X" to close the VBA editor.

Double click in cell A1 and a "X" will appear. Double click again and the
"X" will disappear.

Adjust the range where you want this to happen by changing this line of
code:

If Not Intersect(Target, Range("A1")) Is Nothing Then

For example, if you want the range to be A1:A10:

If Not Intersect(Target, Range("A1:A10")) Is Nothing Then

Biff

"jcarr25" wrote in message
...
I need to be able to click the cell and an "X" will appear or disappear. A
radio button would work, too.

Any help?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
does excel that a dynamic "slide" feature for IRR calculations Matt Excel Worksheet Functions 0 October 13th 06 05:21 PM
does excel that a dynamic "slide" feature for IRR calculations Matt Excel Worksheet Functions 0 October 13th 06 05:20 PM
HELP! Clicking "$" button changes format to ";;" not what it shoul Rock Robster Excel Discussion (Misc queries) 1 October 7th 06 04:04 AM
Help feature in Excel should have more "pictures" to guide. Haja New Users to Excel 2 June 1st 06 05:33 PM
Can you add the "Change Case" feature to Excel on future versions gigimarsh Excel Discussion (Misc queries) 0 May 5th 06 05:22 PM


All times are GMT +1. The time now is 05:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"