A
asafswis2
hello guys.
i really need some help with that thing.
im newbie in vba but rally like all that stuff.
i have this table:
and i have a form for a user
that i want he can update the table like this:
the user choose a name from the "worker name" combo-box
and when he click on "update" so the "yes/no" column in the table wil
show "yes" for the name that was chosen by the user.
second thing is that
when the user choose a name and click on the empty button, so it wil
delete all the record of the name was chosen (all the row).
this is the code of the form so far
Private Sub cmdAdd_Click()
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("workers")
'בדיקה אם
הוכנסו
פרטים
If Trim(Me.cmbWN.Value) = "" Then
Me.cmbWN.SetFocus
MsgBox "הכנס שם
עובד"
Exit Sub
End If
If Trim(Me.tbDate.Value) = "" Then
Me.tbDate.SetFocus
MsgBox "הכנס
תאריך
בחינה"
Exit Sub
End If
ActiveWorkbook.Save
End Sub
Private Sub tbDate_Change()
End Sub
Private Sub UserForm_Initialize()
Dim cFullName As Range
Dim ws As Worksheet
Set ws = Worksheets("workers")
For Each cFullName I
ws.Range("שםפרטי")
With Me.cmbWN
.AddItem cFullName.Value
.List(.ListCount - 1, 1) = cFullName.Offset(0, 1).Value
End With
Next cFullName
tbDate.Text = Sheets("not done").Range("J3").Text
End Sub
thank for all helper
+-------------------------------------------------------------------
|Filename: 1.jpg
|Download: http://www.excelbanter.com/attachment.php?attachmentid=862
|Filename: 2.jpg
|Download: http://www.excelbanter.com/attachment.php?attachmentid=863
+-------------------------------------------------------------------
i really need some help with that thing.
im newbie in vba but rally like all that stuff.
i have this table:
and i have a form for a user
that i want he can update the table like this:
the user choose a name from the "worker name" combo-box
and when he click on "update" so the "yes/no" column in the table wil
show "yes" for the name that was chosen by the user.
second thing is that
when the user choose a name and click on the empty button, so it wil
delete all the record of the name was chosen (all the row).
this is the code of the form so far
Private Sub cmdAdd_Click()
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("workers")
'בדיקה אם
הוכנסו
פרטים
If Trim(Me.cmbWN.Value) = "" Then
Me.cmbWN.SetFocus
MsgBox "הכנס שם
עובד"
Exit Sub
End If
If Trim(Me.tbDate.Value) = "" Then
Me.tbDate.SetFocus
MsgBox "הכנס
תאריך
בחינה"
Exit Sub
End If
ActiveWorkbook.Save
End Sub
Private Sub tbDate_Change()
End Sub
Private Sub UserForm_Initialize()
Dim cFullName As Range
Dim ws As Worksheet
Set ws = Worksheets("workers")
For Each cFullName I
ws.Range("שםפרטי")
With Me.cmbWN
.AddItem cFullName.Value
.List(.ListCount - 1, 1) = cFullName.Offset(0, 1).Value
End With
Next cFullName
tbDate.Text = Sheets("not done").Range("J3").Text
End Sub
thank for all helper
+-------------------------------------------------------------------
|Filename: 1.jpg
|Download: http://www.excelbanter.com/attachment.php?attachmentid=862
|Filename: 2.jpg
|Download: http://www.excelbanter.com/attachment.php?attachmentid=863
+-------------------------------------------------------------------