i always get this error when i try to run...does anyone know what's the problem
Option Explicit
Private Sub UserForm_Initialize()
UpdateData
cbxDept.AddItem "Marketing & Sales"
cbxDept.AddItem "Supply Chain"
cbxDept.AddItem "Purchasing"
cbxDept.AddItem "Technical & Production"
cbxDept.AddItem "Research & Development"
cbxDept.AddItem "Finance & Control"
cbxDept.AddItem "Human Resource"
cbxDept.AddItem "Globe & ISIT Services"
End Sub
Private Sub cmdPrevious_Click()
If txtRow.Text > 1 Then txtRow.Velue = txtRow.Value - 1
UpdateData
End Sub
Private Sub cmdNext_Click()
If txtRow.Text < Range("Database").Rows.Count Then txtRow.Value = txtRow.Value + 1
UpdateData
End Sub
Private Sub txtFName_AfterUpdate()
Range("A2")(txtRow.Text).Value = txtFName.Value
End Sub
Private Sub txtLName_AfterUpdate()
Range("B2")(txtRow.Text).Value = txtLastName.Value
End Sub
Private Sub cbxDept_AfterUpdate()
Range("C2")(txtRow.Text).Value = cbxDept.Value
End Sub
Private Sub txtRow_AfterUpdate()
If txtRow.Text < 1 Then
txtRow.Text = 1
ElseIf txtRow.Text > Range("Database").Rows.Count Then
txtRow.Text = Range("Database").Rows.Count
End If
UpdateData
txtFName.SetFocus
End Sub
Private Sub UpdateData()
txtFName.Text = Range("A2")(txtRow.Text).Value
txtLName.Text = Range("B2")(txtRow.Text).Value
cbxDept.DropButtonStyle = Range("C2")(txtRow.Text).Value
End Sub
thanx