lovett10
08-19-2011, 07:06 AM
Hi i am trying to create code but dont know how to implement it to see the data validation cells.
Private Sub CommandButton1_Click()
Dim cbo As OLEObject
Dim ws As Worksheet
Dim NextRow As Long
Set ws = Worksheets("ConduitCollectedInfo")
If ws.Range("A1").Value2 = "" Then
ws.Range("A1:N1").Value = Array("Colour", "Size", "Product", "Quantity")
NextRow = 2
Else
NextRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row + 1
End If
With Worksheets("Conduit")
ws.Cells(NextRow, "A").Value =
ws.Cells(NextRow, "B").Value =
ws.Cells(NextRow, "C").Value =
ws.Cells(NextRow, "D").Value = .OLEObjects("Textbox1").Object.Value
End With
End Sub
Thats my code i need the Rows A,B and C to match up with the 3 data validation lists i have.
Ive uploaded incase i make no sense :P ...6444
Thanks in advance for the help
Private Sub CommandButton1_Click()
Dim cbo As OLEObject
Dim ws As Worksheet
Dim NextRow As Long
Set ws = Worksheets("ConduitCollectedInfo")
If ws.Range("A1").Value2 = "" Then
ws.Range("A1:N1").Value = Array("Colour", "Size", "Product", "Quantity")
NextRow = 2
Else
NextRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row + 1
End If
With Worksheets("Conduit")
ws.Cells(NextRow, "A").Value =
ws.Cells(NextRow, "B").Value =
ws.Cells(NextRow, "C").Value =
ws.Cells(NextRow, "D").Value = .OLEObjects("Textbox1").Object.Value
End With
End Sub
Thats my code i need the Rows A,B and C to match up with the 3 data validation lists i have.
Ive uploaded incase i make no sense :P ...6444
Thanks in advance for the help