That is very good code for a beginner. IMO, you will be a very good programmer when you develop a good Programming Style
There (<<<<<<<<<<<<) are the changes I recommend at this time.
Option Explicit '<<<<<<<<<<<<<<
Dim Empid As Integer, i As Long, j As Long, flag As Boolean '<<<<<<<<<<<<<<<
Private Sub cmdnext_Click()
'i = 0 <<<<<<<<<<<<<<<<<<<<<<<
i = i + 1
'flag = True'<<<<<<<<<<<<<<<<<<<<
For j = 1 To 34
UserForm1.Controls("TextBox" & j).Value = cells(i, j).Value
Next j
End Sub
Sub GetData()
If IsNumeric(UserForm1.TextBox1.Value) Then
flag = False
i = 0
Empid = UserForm1.TextBox1.Value
Do While cells(i + 1, 1).Value <> ""
If cells(i + 1, 1).Value = Empid Then
flag = True
For j = 2 To 34
UserForm1.Controls("TextBox" & j).Value = cells(i + 1, j).Value
Next j
Exit Do '<<<<<<<<<<<<<<<<<<
End If
i = i + 1
Loop
If flag = False Then
For j = 2 To 34
UserForm1.Controls("TextBox" & j).Value = ""
Next j
End If
Else
ClearForm
End If
End Sub
Sub ClearForm()
For j = 1 To 34
UserForm1.Controls("TextBox" & j).Value = ""
Next j
i = 0 '<<<<<<<<<<<<<<
j = 0 '<<<<<<<<<<<<<<
flag = False '<<<<<<<<<<<<<<
End Sub
Sub EditAdd()
Dim emptyRow As Long
If UserForm1.TextBox1.Value <> "" Then
flag = False
i = 0
Empid = UserForm1.TextBox1.Value
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
Do While cells(i + 1, 1).Value <> ""
If cells(i + 1, 1).Value = Empid Then
flag = True
For j = 2 To 34
cells(i + 1, j).Value = UserForm1.Controls("TextBox" & j).Value
Next j
Exit Do '<<<<<<<<<<<<<<<<<
End If
i = i + 1
Loop
If flag = False Then
For j = 1 To 34
cells(emptyRow, j).Value = UserForm1.Controls("TextBox" & j).Value
Next j
End If
End If
End Sub