Hi ,
I think there is a problem that Skydrive does not support VBAProject , or something like that. I am posting the two procedures here. Copy and paste them in ThisWorkBook in your VBAProject.
Public Sub Incorporate()
Application.ScreenUpdating = False
Start_Cell = "A7"
End_Cell = "A100"
ThisWorkbook.Worksheets("Week4").Activate
Range(Start_Cell).Select
counter = 0
Workbooks("Incoming_Data.xlsm").Worksheets("10-25").Activate
Range(Start_Cell, End_Cell).Select
For Each user_name In Selection
If Is_User_Name_Valid(user_name) Then
item_date = Range(user_name.Address).Offset(1, 1).Value
Hours_Worked = Range(user_name.Address).Offset(0, 2).Value
Visit_Count = Range(user_name.Address).Offset(0, 3).Value
Proc_Count = Range(user_name.Address).Offset(0, 6).Value
ThisWorkbook.Worksheets("Week4").Activate
added = False
For i = 0 To 100
If user_name = Range(Start_Cell).Offset(i, 0).Value Then
Range(Start_Cell).Offset(i, 2).Value = Range(Start_Cell).Offset(i, 2).Value + Hours_Worked
Range(Start_Cell).Offset(i, 3).Value = Range(Start_Cell).Offset(i, 3).Value + Visit_Count
Range(Start_Cell).Offset(i, 4).Value = Range(Start_Cell).Offset(i, 4).Value + Proc_Count
added = True
Exit For
End If
Next
If Not added Then
ActiveCell.Offset(counter, 0).Value = user_name
ActiveCell.Offset(counter, 1).Value = item_date
ActiveCell.Offset(counter, 2).Value = Hours_Worked
ActiveCell.Offset(counter, 3).Value = Visit_Count
ActiveCell.Offset(counter, 4).Value = Proc_Count
End If
counter = counter + 1
Workbooks("Incoming_Data.xlsm").Worksheets("10-25").Activate
End If
Application.ScreenUpdating = True
Next
End Sub
Function Is_User_Name_Valid(ByVal username As String)
Is_User_Name_Valid = True
If Len(username) <> 5 Then Is_User_Name_Valid = False
first_two_characters = Left(username, 2)
If Val(first_two_characters) <> 0 Then Is_User_Name_Valid = False
Last_three_characters = Right(username, 3)
If Val(Last_three_characters) = 0 Then Is_User_Name_Valid = False
End Function
Narayan