So I am thoroughly stuck now. I am trying to set up my next and previous buttons, and I have tried multipe variations found online and nothing has worked. At all!!
The TextBox between the next and previous button is "TextBox9 and when the number is input in that it pops up all the info into the proper textBoxes on the userform. The coding I have to do this is rather long, but it functions. Hopefully someone will know how to help me.
Code for TextBox9
The locked command buttons is the save Function so someone can't save over the previous quote. Please please plesae help!!!
The TextBox between the next and previous button is "TextBox9 and when the number is input in that it pops up all the info into the proper textBoxes on the userform. The coding I have to do this is rather long, but it functions. Hopefully someone will know how to help me.
Code for TextBox9
Code:
Private Sub TextBox9_Change()Dim I As Long, Lastrow As Long
Lastrow = Sheets("Quotes").Range("A" & Rows.Count).End(xlUp).Row
For I = 2 To Lastrow
If Sheets("Quotes").Cells(I, "A").Value = TextBox9 Or _
Sheets("Quotes").Cells(I, "A").Value = Val(TextBox9) Then
Dim Words() As String, LastColumn As Long
Dim Cars() As String, LastCell As Long
Dim custadd() As String, Smart As Long
Smart = Sheets("Quotes").Range("I" & Rows.Count).End(xlUp).Row
LastColumn = Sheets("Quotes").Range("I" & Rows.Count).End(xlUp).Row
LastCell = Sheets("Quotes").Range("I" & Rows.Count).End(xlUp).Row
Words = Split(Cells(I, "I").Value)
Cars = Split(Cells(I, "C").Value)
custadd = Split(Cells(I, "T").Value)
Me.quotenumber = Sheets("Quotes").Cells(I, "A").Value
Me.Date1 = Sheets("Quotes").Cells(I, "B").Value
On Error Resume Next
FirstName.Value = Words(0)
On Error Resume Next
LastName.Value = Words(1)
Year.Value = Cars(0)
Make.Value = Cars(1)
Model.Value = Cars(2)
If UBound(Cars) > 2 Then Model.Value = Cars(2) + " " + Cars(3)
shipfirst.Value = custadd(0)
shiplast.Value = custadd(1)
On Error Resume Next
Me.size = Sheets("Quotes").Cells(I, "D").Value
Me.ComboBox1 = Sheets("Quotes").Cells(I, "E").Value
Me.Cost = Sheets("Quotes").Cells(I, "F").Value
Me.custnumber = Sheets("Quotes").Cells(I, "G").Value
Me.company = Sheets("Quotes").Cells(I, "H").Value
Me.Phone1 = Sheets("Quotes").Cells(I, "J").Value
Me.City = Sheets("Quotes").Cells(I, "K").Value
Me.State = Sheets("Quotes").Cells(I, "L").Value
Me.ZipCode = Sheets("Quotes").Cells(I, "M").Value
Me.Email = Sheets("Quotes").Cells(I, "N").Value
Me.Initals = Sheets("Quotes").Cells(I, "P").Value
Me.TextBox7 = Sheets("Quotes").Cells(I, "Q").Value
Me.TextBox8 = Sheets("Quotes").Cells(I, "R").Value
Me.shipco = Sheets("Quotes").Cells(I, "S").Value
Me.shipadd1 = Sheets("Quotes").Cells(I, "U").Value
Me.shipadd2 = Sheets("Quotes").Cells(I, "V").Value
Me.shipcity = Sheets("Quotes").Cells(I, "W").Value
Me.shipstate = Sheets("Quotes").Cells(I, "X").Value
Me.shipzip = Sheets("Quotes").Cells(I, "Y").Value
Me.shipphone = Sheets("Quotes").Cells(I, "Z").Value
Me.shipemail1 = Sheets("Quotes").Cells(I, "AA").Value
Me.TAW = Sheets("Quotes").Cells(I, "AB").Value
End If
Next
CommandButton6.Enabled = False
End Sub
The locked command buttons is the save Function so someone can't save over the previous quote. Please please plesae help!!!