i have created Macro to data entry in excel sheet. in that all the details update automatically. but for 1 field, we need user input through user form.
UserForm is as below.
Combobox1 - 1. AFRICA
2. MIDDLE-EAST
Commandbutton1 - OK
-------------------------------------
my macro is as below.:-
SUB FER Update()
Dim KPReg As String
If destination.Cells(emptyrow, 3) = "MW" Then
destination.Cells(emptyrow, 10) = "ASIA"
ElseIf destination.Cells(emptyrow, 3) = "SR" Then
destination.Cells(emptyrow, 10) = "AMERICAS"
ElseIf destination.Cells(emptyrow, 3) = "KP" Then
UserForm2.Show
End if
end sub ()
command button click event :-
Private Sub CommandButton1_Click()
Unload Me
End Sub
Pls help to modify code
UserForm is as below.
Combobox1 - 1. AFRICA
2. MIDDLE-EAST
Commandbutton1 - OK
-------------------------------------
my macro is as below.:-
SUB FER Update()
Dim KPReg As String
If destination.Cells(emptyrow, 3) = "MW" Then
destination.Cells(emptyrow, 10) = "ASIA"
ElseIf destination.Cells(emptyrow, 3) = "SR" Then
destination.Cells(emptyrow, 10) = "AMERICAS"
ElseIf destination.Cells(emptyrow, 3) = "KP" Then
UserForm2.Show
End if
end sub ()
command button click event :-
Private Sub CommandButton1_Click()
Unload Me
End Sub
Pls help to modify code