capture date at another sheets using Marlett

N

niailmar

I need an expert like you to solve my problem.

I have a Attendant Table for Staff, which consists of Name, Staff ID an
so on.
I have already create the code for “Automatic appearance of date i
Column D when you Double Click the Column C of attendance column “. Th
code is like this:

Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel A
Boolean)
'Limit Target count to 1
If Target.Count > 1 Then Exit Sub
'Isolate Target to a specific range
If Intersect(Target, Range("CheckBoxs")) Is Nothing Then Exit Sub
'Set Target font to "marlett"
Target.Font.Name = "marlett"
'Check value of target
If Target.Value <> "a" Then
Target.Value = "a" 'Sets target Value = "a"
Cancel = True
Exit Sub
End If
If Target.Value = "a" Then
Target.ClearContents 'Sets target Value = ""
Cancel = True
Exit Sub
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
'Limit Target count to 1
If Target.Count > 1 Then Exit Sub
'Isolate Target to a specific range
If Intersect(Target, Range("CheckBoxs")) Is Nothing Then Exit Sub
'Select a specific subset of the range "Ckboxes"
Select Case Target.Address
Case Else

If Target.Value = "a" Then
Target.Offset(0, 1).Value = Date
Else:

Target.Offset(0, 1).Value = ""
End If
End Select



Name and staff id already available in sheet2. Sheet2 is the databas
that will be store all the information. Date that will captured i
current date(today date) when double click the Column C of attendanc
column then date will appear. I will clicking in the row at attendanc
column. The tick is create by using marlett function. You can refer th
coding above.The action should be done is like this, if sheet2 hav
similar name and staff id like in sheet1 then date is should copy or ??
in sheet2 (column date)


I hope you can help me bout this problem. I attach an image to clea
what I need.
I appreciate your help
 
P

Peter T

Your worksheet event code works fine. However I don't understand what you
want to do, in particular -
The action should be done is like this, if sheet2 have
similar name and staff id like in sheet1 then date is should copy or ???
in sheet2 (column date)

Try and explain, give alternative examples of data in cells (give addresses
including on what sheet), what you want before and after double clicking.
Also what sheet is the event code run in.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top