View Single Post
  #1   Report Post  
niailmar niailmar is offline
Banned
 
Posts: 3
Default capture date at another sheets using Marlett

I need an expert like you to solve my problem.

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

Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As 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 database that will be store all the information. Date that will captured is current date(today date) when double click the Column C of attendance column then date will appear. I will clicking in the row at attendance column. The tick is create by using marlett function. You can refer the coding above.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)


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