Prev Previous Post   Next Post Next
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Macro?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "B1:B100"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Offset(0, -1).Value < "" Then
If .Value = "X" Then
.Value = ""
Else
.Value = "X"
End If
End If
End With
End If

ws_exit:
Application.EnableEvents = True
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

RP
(remove nothere from the email address if mailing direct)


"Mjohnson" wrote in message
...
I am not sure what function I need to use, but what I am looking for is
this.... I have a spreadsheet that lists all of my tasks. As soon as a

task
is complete, I want to be able to click in the next column, same row, and
have an X populated in that field. I don't want to have to type the X.

As
soon as I click the cell with the mouse I want the X to appear, and if I
click the same cell again, I want the X to be removed. Is there an easy

way
to set this up? I was looking to see if there was any type of toggle

button
feature that would do this and was unsuccessful.

Thanks!



 
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
Can T Get Macro To Run! Nipper New Users to Excel 2 November 4th 05 04:48 AM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM


All times are GMT +1. The time now is 06:44 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"