Please Help Guys its really Urgent...

Status
Not open for further replies.

omkar sathaye

New Member
Joined
Jan 22, 2014
Messages
2
Hi, I m new to this forum & Also for <ACRONYM title="visual basic for applications">VBA</ACRONYM> I m creating a userform which will search an employee id entered in one textbox of userform, as user will hit OK it traces the entered number and displays it and its adjacent rows details in userform, which will be uneditable in userform, my userform traces the userinput but i don,t have idea to auto populate remaining fields of userform... also please help to create hotkey to relaunch my userform...
my sheet contains..:
Column A : Employee ID
Column B : Employee Status (No need to populate in userform)
Column C : Employee Name
Column D : Termination Date
Column E : Location
Column F : Exit Type( Reason of Termination)

Below is my userform please assist Guys...

Dim ctl As Control
Private Sub cmdcancel_Click()
Unload Me
End Sub

Private Sub cmdclear_Click()
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Or TypeName(ctl) = "ComboBox" Then
ctl.Value = ""
ElseIf TypeName(ctl) = "CheckBox" Then
ctl.Value = False
End If
Next ctl
End Sub

Private Sub CmdOK_Click()
Dim ws As Worksheet
Dim FindString As String
Dim Rng As Range
Set ws = ThisWorkbook.Worksheets("Sheet1")
FindString = TxtEmployeeID.Value
If Trim(FindString) <> "" Then
Set Rng = ws.Cells.Find( _
What:=FindString, _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
Else
MsgBox "No Match Found !"
End If
End If
End Sub

Private Sub Label5_Click()
End Sub

Private Sub Label1_Click()
End Sub

Private Sub Label4_Click()
End Sub

Private Sub TxtDateofTermination_Change()
End Sub

Private Sub TxtEmployeeID_Change()
End Sub

Private Sub TxtEmployeename_Change()
End Sub

Private Sub TxtLocation_Change()
End Sub

Private Sub TxtReasonofTermination_Change()
End Sub​
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Status
Not open for further replies.

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,541
Latest member
iparraguirre89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top