Private Sub YourName_Change()Worksheets("RSG Activity Tracker").[a2].Value = YourName.ValueEnd Sub
--
You received this message because you are subscribed to a topic in the Google Groups "excel vba" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/excel-vba/hc8MRjQXzfE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to excel-vba+...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-vba.
For more options, visit https://groups.google.com/d/optout.
can u send me screenshot of user form..
actually it should not be textbox change event, but textbox exit event ..
great..
Cheers
I have created a shared workbook containing a userform that has VBA code to transfer input data to a worksheet. However, when multiple users enter data a Resolve Conflict dialog box is displayed as follows:
Your changes on sheet "SrOfcSpc" changed cell A4 from '' to '4/15/2016' Conflicting changes by John Doe -- 4/11/16 3:44PM changed cell A4 from '' to '4/11/2016'
How can I prevent this from happening so that multiple users can input at the same time but data is written to separate lines without overwriting the previous user? Below is a snippet of my existing code. Thank you.
lrCD4 = Sheets("SrOfcSpc").Range("A" & Rows.Count).End(xlUp).Row
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "A").Value = TextBox43.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "B").Value = TextBox44.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "C").Value = TextBox25.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "D").Value = TextBox26.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "E").Value = TextBox27.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "F").Value = TextBox31.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "G").Value = TextBox23.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "H").Value = TextBox24.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "I").Value = TextBox29.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "J").Value = TextBox30.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "K").Value = TextBox195.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "L").Value = TextBox196.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "M").Value = TextBox204.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "N").Value = TextBox203.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "O").Value = TextBox200.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "P").Value = TextBox199.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "Q").Value = TextBox198.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "R").Value = TextBox197.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "S").Value = TextBox202.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "T").Value = TextBox201.Text
Sheets("SrOfcSpc").Cells(lrCD4 + 1, "U").Value = TextBox205.Text
Visit this group at https://groups.google.com/group/excel-vba.
Hello Vaibhav Joshi,Thank you for such a speedy reply; however the code you provided does not work. Whenever two separate users attempt to input data into the userform and save, the last person to save is prompted to overwrite the previous user's data. I need for the VBA code to move to the next row instead of the same one that the first user is inputting data to.I have been searching the internet to find a solution and noticed that a user at this link http://www.ozgrid.com/forum/showthread.php?t=144176 recommended the below VBA code:Function GetNextRow() As Long Dim lngNextRow As Long lngNextRow = Val(Dir("C:\*RowIdentity.txt")) Name "C:\" & Dir("C:\*RowIdentity.txt") As "C:\" & lngNextRow + 1 & "RowIdentity.txt" GetNextRow = lngNextRow End Function Sub Test() MsgBox (GetNextRow) End SubHowever, I am not sure where to place the above code in my own workbook?? I have included a small snippet of what my starting code looks like. If it's possible that the above suggestion would work, where would I place it in my code?Private Sub CommandButton1_Click()
Dim lrCD1 As Long, lrCD2 As Long, lrCD3 As Long, lrCD4 As Long, lrCD5 As Long, lrCD6 As LonglrCD1 = Sheets("Recruiter").Range("A" & Rows.Count).End(xlUp).Row
Sheets("Recruiter").Cells(lrCD1 + 1, "A").Value = TextBox2.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "B").Value = TextBox1.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "C").Value = TextBox3.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "D").Value = TextBox4.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "E").Value = TextBox7.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "F").Value = TextBox206.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "G").Value = TextBox5.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "H").Value = TextBox6.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "I").Value = TextBox10.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "J").Value = TextBox8.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "K").Value = TextBox9.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "L").Value = TextBox37.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "M").Value = TextBox38.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "N").Value = TextBox39.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "O").Value = TextBox41.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "P").Value = TextBox40.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "Q").Value = TextBox42.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "R").Value = TextBox59.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "S").Value = TextBox58.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "T").Value = TextBox57.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "U").Value = TextBox56.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "V").Value = TextBox36.TextExcelVbaLab:
lrCD1 = lrCD1 + 1
Sheets("Recruiter").Cells(lrCD1 + 1, "A").Value = TextBox2.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "B").Value = TextBox1.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "C").Value = TextBox3.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "D").Value = TextBox4.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "E").Value = TextBox7.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "F").Value = TextBox206.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "G").Value = TextBox5.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "H").Value = TextBox6.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "I").Value = TextBox10.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "J").Value = TextBox8.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "K").Value = TextBox9.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "L").Value = TextBox37.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "M").Value = TextBox38.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "N").Value = TextBox39.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "O").Value = TextBox41.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "P").Value = TextBox40.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "Q").Value = TextBox42.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "R").Value = TextBox59.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "S").Value = TextBox58.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "T").Value = TextBox57.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "U").Value = TextBox56.Text
Sheets("Recruiter").Cells(lrCD1 + 1, "V").Value = TextBox36.Text
--
You received this message because you are subscribed to the Google Groups "excel vba" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-vba+...@googlegroups.com.
Hello Vaibhav Joshi,
--
You received this message because you are subscribed to the Google Groups "excel vba" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-vba+...@googlegroups.com.