Hi everyone,

I am new here and in VBA.
I have a problem with inputboxes.

I have put two same inputboxes in one macro, which should fill cells with entered data.
However, the second inputbox does not work properly. It keeps returning me to input box when i enter the requested number. I cant see what is the problem, since the code is the same for both inputboxes.

Can someone please help me with this?
Also, is there any way to merge these two inputboxes into one (two lines which can be used separately in two different cells)?

*These two inputboxes worked when i originally made them to work under commandbutton in excel. However, i decided to put it as commandbutton in userform and that messed it up.

First inputbox: (working)

Private Sub receivables_from_related_parties()

Enter:
On Error GoTo Badentry
PPO = InputBox("Enter amount of receivables from related parties as of" & TextBox2.Text, "Receivables from related parties", "Enter whole number without decimal points")
If Not IsNumeric(PPO) Then
GoTo Badentry
Else
Call FORMULE2
Exit Sub
End If
Badentry:
MsgBox "Only numbers can be entered"
Resume Enter:
Call FORMULE2

End Sub
_____________
Second input box (looping error)

Private Sub Liabilities_towards_related_parties()

Enter:
On Error GoTo Badentry
OPOO = InputBox("Enter amount of liabilities towards related parties as of " & TextBox2.Text & _
" !Without loans!", "Liabilities towards related parties", "Enter whole number without decimal points")
If Not IsNumeric(OPOO) Then
GoTo Badentry
Else
Call FORMULE3
Exit Sub
End If
Badentry:
MsgBox "Only numbers can be entered"
Resume Enter:
Call FORMULE3

End Sub
_________
Both, PPO and OPOO are declared as strings (public) in module.