G
Guest
Hi All,
I have a table with several rows and columns. Within the table, are several
versions of the following three columns:
Tick "Yes, I have done something";
Date it was done;
Commentary, "But it's not all finished..."; Some kind of text entirely at
user's discretion.
Thanks to Bob Philips, I can now, on a double-click, get a tick, and the
date, and I trust my users can type...
Because Bob clearly found that too easy, I am being a little bit more
adventurous on his/anyone else's behalf:
Can I rig it so that, say the user comes along a week later, to update those
three entries, he/she can double-click, to blank the three cells, the former
contents of the last two cells being stored in a comment tied to one of the
cells?
Then come along a week later, update, the latest stuff being stored on the
next line in the same comment box, etc., etc.?
I'm pretty sure this can be done but what are the practical limitations -
just how much info. can one comment store?
Here's Bob's original solution for ticks / dates:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
Const WS_RANGE As String = "O:O,S:S,X:X,AC:AC"
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Value <> "a" Then
.Font.Name = "Marlett"
.Value = "a"
.Offset(0, 1).Value = Date
.Offset(0, 1).NumberFormat = "dd-mmm-yy"
Else
.Value = ""
.Offset(0, 1).Value = ""
End If
End With
End If
End Sub
Just so's you know what kind of an Excel halfwit you're dealing with, I
realise that I could input a further line to blank the second cell along as
well -
..Offset(0, 1).Value = ""
but how do I get one line to kill both adjacent cells?
Finally, is there any way I can draw up (presumably) a second macro which
has some 'on x event' instructions, so that users who bypass the
double-click/tick approach, and just input a new date, suffer the same
consequence?
I suspect that there are many of you who will have dealt with this already;
if you have tutorials, etc., covering this then I'll be more than happy to
have a butcher's.
Many, many thanks in advance.
If you can get it to make the tea as well, I'd be most grateful...
Regards,
I have a table with several rows and columns. Within the table, are several
versions of the following three columns:
Tick "Yes, I have done something";
Date it was done;
Commentary, "But it's not all finished..."; Some kind of text entirely at
user's discretion.
Thanks to Bob Philips, I can now, on a double-click, get a tick, and the
date, and I trust my users can type...
Because Bob clearly found that too easy, I am being a little bit more
adventurous on his/anyone else's behalf:
Can I rig it so that, say the user comes along a week later, to update those
three entries, he/she can double-click, to blank the three cells, the former
contents of the last two cells being stored in a comment tied to one of the
cells?
Then come along a week later, update, the latest stuff being stored on the
next line in the same comment box, etc., etc.?
I'm pretty sure this can be done but what are the practical limitations -
just how much info. can one comment store?
Here's Bob's original solution for ticks / dates:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
Const WS_RANGE As String = "O:O,S:S,X:X,AC:AC"
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Value <> "a" Then
.Font.Name = "Marlett"
.Value = "a"
.Offset(0, 1).Value = Date
.Offset(0, 1).NumberFormat = "dd-mmm-yy"
Else
.Value = ""
.Offset(0, 1).Value = ""
End If
End With
End If
End Sub
Just so's you know what kind of an Excel halfwit you're dealing with, I
realise that I could input a further line to blank the second cell along as
well -
..Offset(0, 1).Value = ""
but how do I get one line to kill both adjacent cells?
Finally, is there any way I can draw up (presumably) a second macro which
has some 'on x event' instructions, so that users who bypass the
double-click/tick approach, and just input a new date, suffer the same
consequence?
I suspect that there are many of you who will have dealt with this already;
if you have tutorials, etc., covering this then I'll be more than happy to
have a butcher's.
Many, many thanks in advance.
If you can get it to make the tea as well, I'd be most grateful...
Regards,