Hi. I remain in awe of the willingness of people to help others in this forum... It is unlike anything I have seen before, and I am very grateful for all of you.
Currently, the attached workbook has Userform1, with both textboxes and checkboxes. When a box is checked, a corresponding cell on another sheet is marked with the word "True", and i have conditional formatting to change the color to green. Instead of the work "True" I would like it to insert the system (short) date on the day that the box was checked, so that I can refer back to it to see when each step in the process was completed. I have tried a few different things, but cannot seem to make it work. Below is a piece of the code for the checkboxes. If anyone can help, that would be wonderful.
Part 2.... When i go back to enter an update to a project, as opposed to editing the existing record, it creates a new line item on the 'sales' sheet. I would much prefer to be able to just update the existing record. Could anyone make a suggestion on that as well?
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Dim ListRow As Long
Dim firstEmptyRow As Range
Dim wb As Workbook: Set wb = ThisWorkbook
Set ws = wb.Sheets("Sales")
ListRow = ws.Cells(Rows.Count, 1).End(xlUp).Row
Set firstEmptyRow = ws.Range("A" & ListRow + 1)
With firstEmptyRow
.Offset(0, 0).value = TextBox1.value ' Project Name
.Offset(0, 1).value = TextBox2.value ' Project Number
.Offset(0, 2).value = TextBox3.value ' Sales Rep Last Name
.Offset(0, 3).value = TextBox8.value ' Dollar Value
.Offset(0, 4).value = TextBox4.value
.Offset(0, 5).value = TextBox5.value ' Margin
.Offset(0, 6).value = TextBox6.value ' Project Manager Last Name
.Offset(0, 15).value = TextBox7.value ' Notes
.Offset(0, 7).value = CheckBox1.value = True
.Offset(0, 8).value = CheckBox2.value = True
.Offset(0, 9).value = CheckBox3.value = True
.Offset(0, 10).value = CheckBox4.value = True
.Offset(0, 11).value = CheckBox5.value = True
.Offset(0, 12).value = CheckBox6.value = True
.Offset(0, 13).value = CheckBox7.value = True
.Offset(0, 14).value = CheckBox8.value = True
End With
'Clear the textboxes
TextBox1.value = ""
TextBox2.value = ""
TextBox3.value = ""
TextBox8.value = ""
TextBox4.value = ""
TextBox5.value = ""
TextBox6.value = ""
TextBox7.value = ""
CheckBox1.value = False
CheckBox2.value = False
CheckBox3.value = False
CheckBox4.value = False
CheckBox5.value = False
CheckBox6.value = False
CheckBox7.value = False
CheckBox8.value = False
Bookmarks