rohanmalhotra
New Member
- Joined
- May 4, 2010
- Messages
- 29
Hi all
i have created a userform which will be used by multiple users. What i am looking to do is that the data from the userform is saved on 2 different locations.
1. in the same file so that users can see how much they have logged in a single day
2. to a different location, maybe in their personal drive so that they have a data dump and can refer to whenever they want.
can any one please help me with it? i have added the code.
Thanks for the help.
i have created a userform which will be used by multiple users. What i am looking to do is that the data from the userform is saved on 2 different locations.
1. in the same file so that users can see how much they have logged in a single day
2. to a different location, maybe in their personal drive so that they have a data dump and can refer to whenever they want.
can any one please help me with it? i have added the code.
HTML:
Sub SaveData()
Dim LastRow As Object
Dim ws As Worksheet
Dim MyID As String
Set ws = Worksheets("Data")
Set LastRow = ws.Range("a65536").End(xlUp)
LastRow.Offset(1, 0).Value = Me.txtStaffID.Value
LastRow.Offset(1, 1).Value = Me.txtStaffName.Value
LastRow.Offset(1, 2).Value = Me.txtDate.Value
LastRow.Offset(1, 3).Value = Me.txtPCNumber.Value
LastRow.Offset(1, 4).Value = Me.txtWorkitem.Value
LastRow.Offset(1, 5).Value = Me.txtNSM.Value
LastRow.Offset(1, 6).Value = Me.cboActivity.Value
LastRow.Offset(1, 7).Value = Me.txtStartTime.Value
LastRow.Offset(1, 8).Value = Me.txtEndTime.Value
LastRow.Offset(1, 9).Value = Me.txtEntryRef.Value
LastRow.Offset(1, 10).Value = Me.txtEntryDate.Value
LastRow.Offset(1, 11).Value = Me.lblNotes.Caption
LastRow.Offset(1, 12).Value = Me.ChkResld.Value
LastRow.Offset(1, 13).Value = Me.ChkHandoff.Value
End Sub
Thanks for the help.