Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default click functions

I have a range of 20 possible measurments that correspond to 20 items,
have made a table and want to set it up so that the user has to clic
the cell (or check box) that corresponds to the items measurment. onl
1 out of the 20 possible can selected at a time for each item and th
checked cell must make that cell = "X" or true. Please help??

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default click functions

Try using a column for the checkboxes, and some code like this to put a tick
in the cell
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With Target
If .Column = 1 Then
.EntireColumn.Clear
If .Value = "a" Then
.Value = ""
.Font.Name = "Arial"
.Offset(0, 1).Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
End If
End If
End With
End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jlong " wrote in message
...
I have a range of 20 possible measurments that correspond to 20 items, I
have made a table and want to set it up so that the user has to click
the cell (or check box) that corresponds to the items measurment. only
1 out of the 20 possible can selected at a time for each item and the
checked cell must make that cell = "X" or true. Please help???


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default click functions

I can't seem to get that to work, my range of cells are C3:V23 in whic
only one checkbox of each column can be selected. The cells in eac
column that contain the checked boxes are to get a value of "x" and th
rest must be empty.
This seems like it should be easy but it's not working for me

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default click functions

If you allow row m2 for your checkmarks, use this code variation. To check a
column, just select any of C2:V2

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not Intersect(Target, Range("C2:V2")) Then
With Target
Range("C2:V2").Clear
If .Value = "a" Then
.Value = ""
.Font.Name = "Arial"
.Offset(0, 1).Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
End If
End If
End With
End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jlong " wrote in message
...
I can't seem to get that to work, my range of cells are C3:V23 in which
only one checkbox of each column can be selected. The cells in each
column that contain the checked boxes are to get a value of "x" and the
rest must be empty.
This seems like it should be easy but it's not working for me.


---
Message posted from http://www.ExcelForum.com/



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
Why wont my right click functions work? purplewolf Excel Worksheet Functions 1 February 10th 10 06:12 PM
Some right click functions not working cat1017 Excel Discussion (Misc queries) 0 October 9th 08 05:32 PM
How to change syperlink from single click to double click syperlinker Excel Worksheet Functions 0 June 13th 08 05:01 PM
Disabling click and right-click on the Picture I inserted in an Excel document [email protected] Excel Worksheet Functions 1 June 2nd 06 09:13 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM


All times are GMT +1. The time now is 09:34 PM.

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

About Us

"It's about Microsoft Excel"